From b426edd4854adc6e65844d8c54b8998e792b5778 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 11 Feb 2019 09:30:29 +0100 Subject: Cleanup reset user password by admin And add some tests --- shared/utils/users/users.ts | 2 ++ 1 file changed, 2 insertions(+) (limited to 'shared/utils/users') diff --git a/shared/utils/users/users.ts b/shared/utils/users/users.ts index 61a7e3757..7191b263e 100644 --- a/shared/utils/users/users.ts +++ b/shared/utils/users/users.ts @@ -213,11 +213,13 @@ function updateUser (options: { emailVerified?: boolean, videoQuota?: number, videoQuotaDaily?: number, + password?: string, role?: UserRole }) { const path = '/api/v1/users/' + options.userId const toSend = {} + if (options.password !== undefined && options.password !== null) toSend['password'] = options.password if (options.email !== undefined && options.email !== null) toSend['email'] = options.email if (options.emailVerified !== undefined && options.emailVerified !== null) toSend['emailVerified'] = options.emailVerified if (options.videoQuota !== undefined && options.videoQuota !== null) toSend['videoQuota'] = options.videoQuota -- cgit v1.2.3