diff options
Diffstat (limited to 'shared/extra-utils/users/users.ts')
-rw-r--r-- | shared/extra-utils/users/users.ts | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/shared/extra-utils/users/users.ts b/shared/extra-utils/users/users.ts index 2fe0e55c2..248af2d6e 100644 --- a/shared/extra-utils/users/users.ts +++ b/shared/extra-utils/users/users.ts | |||
@@ -9,14 +9,14 @@ import { UserUpdateMe } from '../../models/users' | |||
9 | import { omit } from 'lodash' | 9 | import { omit } from 'lodash' |
10 | 10 | ||
11 | type CreateUserArgs = { | 11 | type CreateUserArgs = { |
12 | url: string, | 12 | url: string |
13 | accessToken: string, | 13 | accessToken: string |
14 | username: string, | 14 | username: string |
15 | password: string, | 15 | password: string |
16 | videoQuota?: number, | 16 | videoQuota?: number |
17 | videoQuotaDaily?: number, | 17 | videoQuotaDaily?: number |
18 | role?: UserRole, | 18 | role?: UserRole |
19 | adminFlags?: UserAdminFlag, | 19 | adminFlags?: UserAdminFlag |
20 | specialStatus?: number | 20 | specialStatus?: number |
21 | } | 21 | } |
22 | function createUser (parameters: CreateUserArgs) { | 22 | function createUser (parameters: CreateUserArgs) { |
@@ -74,8 +74,8 @@ function registerUser (url: string, username: string, password: string, specialS | |||
74 | } | 74 | } |
75 | 75 | ||
76 | function registerUserWithChannel (options: { | 76 | function registerUserWithChannel (options: { |
77 | url: string, | 77 | url: string |
78 | user: { username: string, password: string, displayName?: string }, | 78 | user: { username: string, password: string, displayName?: string } |
79 | channel: { name: string, displayName: string } | 79 | channel: { name: string, displayName: string } |
80 | }) { | 80 | }) { |
81 | const path = '/api/v1/users/register' | 81 | const path = '/api/v1/users/register' |
@@ -230,8 +230,8 @@ function updateMyUser (options: { url: string, accessToken: string } & UserUpdat | |||
230 | } | 230 | } |
231 | 231 | ||
232 | function updateMyAvatar (options: { | 232 | function updateMyAvatar (options: { |
233 | url: string, | 233 | url: string |
234 | accessToken: string, | 234 | accessToken: string |
235 | fixture: string | 235 | fixture: string |
236 | }) { | 236 | }) { |
237 | const path = '/api/v1/users/me/avatar/pick' | 237 | const path = '/api/v1/users/me/avatar/pick' |
@@ -241,14 +241,14 @@ function updateMyAvatar (options: { | |||
241 | 241 | ||
242 | function updateUser (options: { | 242 | function updateUser (options: { |
243 | url: string | 243 | url: string |
244 | userId: number, | 244 | userId: number |
245 | accessToken: string, | 245 | accessToken: string |
246 | email?: string, | 246 | email?: string |
247 | emailVerified?: boolean, | 247 | emailVerified?: boolean |
248 | videoQuota?: number, | 248 | videoQuota?: number |
249 | videoQuotaDaily?: number, | 249 | videoQuotaDaily?: number |
250 | password?: string, | 250 | password?: string |
251 | adminFlags?: UserAdminFlag, | 251 | adminFlags?: UserAdminFlag |
252 | role?: UserRole | 252 | role?: UserRole |
253 | }) { | 253 | }) { |
254 | const path = '/api/v1/users/' + options.userId | 254 | const path = '/api/v1/users/' + options.userId |