aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/utils
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/utils')
-rw-r--r--server/tests/utils/users/users.ts2
1 files changed, 2 insertions, 0 deletions
diff --git a/server/tests/utils/users/users.ts b/server/tests/utils/users/users.ts
index cd1b07701..41d8ce265 100644
--- a/server/tests/utils/users/users.ts
+++ b/server/tests/utils/users/users.ts
@@ -162,6 +162,7 @@ function unblockUser (url: string, userId: number | string, accessToken: string,
162function updateMyUser (options: { 162function updateMyUser (options: {
163 url: string 163 url: string
164 accessToken: string, 164 accessToken: string,
165 currentPassword?: string,
165 newPassword?: string, 166 newPassword?: string,
166 nsfwPolicy?: NSFWPolicyType, 167 nsfwPolicy?: NSFWPolicyType,
167 email?: string, 168 email?: string,
@@ -172,6 +173,7 @@ function updateMyUser (options: {
172 const path = '/api/v1/users/me' 173 const path = '/api/v1/users/me'
173 174
174 const toSend = {} 175 const toSend = {}
176 if (options.currentPassword !== undefined && options.currentPassword !== null) toSend['currentPassword'] = options.currentPassword
175 if (options.newPassword !== undefined && options.newPassword !== null) toSend['password'] = options.newPassword 177 if (options.newPassword !== undefined && options.newPassword !== null) toSend['password'] = options.newPassword
176 if (options.nsfwPolicy !== undefined && options.nsfwPolicy !== null) toSend['nsfwPolicy'] = options.nsfwPolicy 178 if (options.nsfwPolicy !== undefined && options.nsfwPolicy !== null) toSend['nsfwPolicy'] = options.nsfwPolicy
177 if (options.autoPlayVideo !== undefined && options.autoPlayVideo !== null) toSend['autoPlayVideo'] = options.autoPlayVideo 179 if (options.autoPlayVideo !== undefined && options.autoPlayVideo !== null) toSend['autoPlayVideo'] = options.autoPlayVideo