aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/extra-utils/users
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-05-20 10:04:44 +0200
committerChocobozzz <me@florianbigard.com>2020-05-20 10:17:27 +0200
commit9a7fd9600bf513adffbf2127be7c3a8b4d31073f (patch)
treea2ac8e321f57f5c7add15ec8166a6a2e7bdf989a /shared/extra-utils/users
parent51539e95d954867d5c4561ac56843105253db79c (diff)
downloadPeerTube-9a7fd9600bf513adffbf2127be7c3a8b4d31073f.tar.gz
PeerTube-9a7fd9600bf513adffbf2127be7c3a8b4d31073f.tar.zst
PeerTube-9a7fd9600bf513adffbf2127be7c3a8b4d31073f.zip
Fix external auth email/password update
Also check if an actor does not already exist when creating the user
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