From 9a7fd9600bf513adffbf2127be7c3a8b4d31073f Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 20 May 2020 10:04:44 +0200 Subject: Fix external auth email/password update Also check if an actor does not already exist when creating the user --- shared/extra-utils/users/users.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'shared') 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, .expect(expectedStatus) } -function updateMyUser (options: { url: string, accessToken: string } & UserUpdateMe) { +function updateMyUser (options: { url: string, accessToken: string, statusCodeExpected?: number } & UserUpdateMe) { const path = '/api/v1/users/me' const toSend: UserUpdateMe = omit(options, 'url', 'accessToken') @@ -226,7 +226,7 @@ function updateMyUser (options: { url: string, accessToken: string } & UserUpdat path, token: options.accessToken, fields: toSend, - statusCodeExpected: 204 + statusCodeExpected: options.statusCodeExpected || 204 }) } -- cgit v1.2.3