1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-04 18:29:27 +02:00

Add signup approval API tests

This commit is contained in:
Chocobozzz 2023-01-19 09:28:29 +01:00 committed by Chocobozzz
parent 3e5716dd3a
commit b379759f55
30 changed files with 1418 additions and 452 deletions

View file

@ -214,35 +214,6 @@ export class UsersCommand extends AbstractCommand {
return this.server.login.getAccessToken({ username, password })
}
register (options: OverrideCommandOptions & {
username: string
password?: string
displayName?: string
email?: string
channel?: {
name: string
displayName: string
}
}) {
const { username, password = 'password', displayName, channel, email = username + '@example.com' } = options
const path = '/api/v1/users/register'
return this.postBodyRequest({
...options,
path,
fields: {
username,
password,
email,
displayName,
channel
},
implicitToken: false,
defaultExpectedStatus: HttpStatusCode.NO_CONTENT_204
})
}
// ---------------------------------------------------------------------------
getMyInfo (options: OverrideCommandOptions = {}) {