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:
parent
3e5716dd3a
commit
b379759f55
30 changed files with 1418 additions and 452 deletions
|
@ -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 = {}) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue