aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/extra-utils/users
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-05-20 13:53:51 +0200
committerChocobozzz <me@florianbigard.com>2020-05-20 13:53:51 +0200
commit745437e3ab402d5b8f85de6e9c09c3b6092e5904 (patch)
treef93e8cc7bdffe19b6c19251512b2fd31bfe4f41d /shared/extra-utils/users
parent148ab2f0f043a4c7cc28f9497cb6ae3819e8b838 (diff)
parentf33dc6ab2db1c733f09dcb039b8bf46c69854753 (diff)
downloadPeerTube-745437e3ab402d5b8f85de6e9c09c3b6092e5904.tar.gz
PeerTube-745437e3ab402d5b8f85de6e9c09c3b6092e5904.tar.zst
PeerTube-745437e3ab402d5b8f85de6e9c09c3b6092e5904.zip
Merge branch 'release/2.2.0' into develop
Diffstat (limited to 'shared/extra-utils/users')
-rw-r--r--shared/extra-utils/users/users.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/shared/extra-utils/users/users.ts b/shared/extra-utils/users/users.ts
index 54b506bce..08b7743a6 100644
--- a/shared/extra-utils/users/users.ts
+++ b/shared/extra-utils/users/users.ts
@@ -216,7 +216,7 @@ function unblockUser (url: string, userId: number | string, accessToken: string,
216 .expect(expectedStatus) 216 .expect(expectedStatus)
217} 217}
218 218
219function updateMyUser (options: { url: string, accessToken: string } & UserUpdateMe) { 219function updateMyUser (options: { url: string, accessToken: string, statusCodeExpected?: number } & UserUpdateMe) {
220 const path = '/api/v1/users/me' 220 const path = '/api/v1/users/me'
221 221
222 const toSend: UserUpdateMe = omit(options, 'url', 'accessToken') 222 const toSend: UserUpdateMe = omit(options, 'url', 'accessToken')
@@ -226,7 +226,7 @@ function updateMyUser (options: { url: string, accessToken: string } & UserUpdat
226 path, 226 path,
227 token: options.accessToken, 227 token: options.accessToken,
228 fields: toSend, 228 fields: toSend,
229 statusCodeExpected: 204 229 statusCodeExpected: options.statusCodeExpected || 204
230 }) 230 })
231} 231}
232 232