aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/utils/users/users.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/utils/users/users.ts')
-rw-r--r--server/tests/utils/users/users.ts5
1 files changed, 3 insertions, 2 deletions
diff --git a/server/tests/utils/users/users.ts b/server/tests/utils/users/users.ts
index daf731a14..fc6b26c50 100644
--- a/server/tests/utils/users/users.ts
+++ b/server/tests/utils/users/users.ts
@@ -3,6 +3,7 @@ import * as request from 'supertest'
3import { makePostBodyRequest, makeUploadRequest, makePutBodyRequest } from '../' 3import { makePostBodyRequest, makeUploadRequest, makePutBodyRequest } from '../'
4 4
5import { UserRole } from '../../../../shared/index' 5import { UserRole } from '../../../../shared/index'
6import { NSFWPolicyType } from '../../../../shared/models/videos/nsfw-policy.type'
6 7
7function createUser ( 8function createUser (
8 url: string, 9 url: string,
@@ -128,7 +129,7 @@ function updateMyUser (options: {
128 url: string 129 url: string
129 accessToken: string, 130 accessToken: string,
130 newPassword?: string, 131 newPassword?: string,
131 displayNSFW?: boolean, 132 nsfwPolicy?: NSFWPolicyType,
132 email?: string, 133 email?: string,
133 autoPlayVideo?: boolean 134 autoPlayVideo?: boolean
134 description?: string 135 description?: string
@@ -137,7 +138,7 @@ function updateMyUser (options: {
137 138
138 const toSend = {} 139 const toSend = {}
139 if (options.newPassword !== undefined && options.newPassword !== null) toSend['password'] = options.newPassword 140 if (options.newPassword !== undefined && options.newPassword !== null) toSend['password'] = options.newPassword
140 if (options.displayNSFW !== undefined && options.displayNSFW !== null) toSend['displayNSFW'] = options.displayNSFW 141 if (options.nsfwPolicy !== undefined && options.nsfwPolicy !== null) toSend['nsfwPolicy'] = options.nsfwPolicy
141 if (options.autoPlayVideo !== undefined && options.autoPlayVideo !== null) toSend['autoPlayVideo'] = options.autoPlayVideo 142 if (options.autoPlayVideo !== undefined && options.autoPlayVideo !== null) toSend['autoPlayVideo'] = options.autoPlayVideo
142 if (options.email !== undefined && options.email !== null) toSend['email'] = options.email 143 if (options.email !== undefined && options.email !== null) toSend['email'] = options.email
143 if (options.description !== undefined && options.description !== null) toSend['description'] = options.description 144 if (options.description !== undefined && options.description !== null) toSend['description'] = options.description