Fix external auth email/password update

Also check if an actor does not already exist when creating the user
This commit is contained in:
Chocobozzz
2020-05-20 10:04:44 +02:00
parent 51539e95d9
commit 9a7fd9600b
8 changed files with 32 additions and 8 deletions

View File

@@ -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
})
}