diff options
author | Chocobozzz <me@florianbigard.com> | 2020-05-20 10:04:44 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2020-05-20 10:17:27 +0200 |
commit | 9a7fd9600bf513adffbf2127be7c3a8b4d31073f (patch) | |
tree | a2ac8e321f57f5c7add15ec8166a6a2e7bdf989a /shared/extra-utils | |
parent | 51539e95d954867d5c4561ac56843105253db79c (diff) | |
download | PeerTube-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')
-rw-r--r-- | shared/extra-utils/users/users.ts | 4 |
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 | ||
219 | function updateMyUser (options: { url: string, accessToken: string } & UserUpdateMe) { | 219 | function 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 | ||