aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api/users.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/controllers/api/users.ts')
-rw-r--r--server/controllers/api/users.ts3
1 files changed, 3 insertions, 0 deletions
diff --git a/server/controllers/api/users.ts b/server/controllers/api/users.ts
index d6c0e67f9..995542604 100644
--- a/server/controllers/api/users.ts
+++ b/server/controllers/api/users.ts
@@ -134,6 +134,7 @@ async function createUser (req: express.Request) {
134 password: body.password, 134 password: body.password,
135 email: body.email, 135 email: body.email,
136 displayNSFW: false, 136 displayNSFW: false,
137 autoPlayVideo: true,
137 role: body.role, 138 role: body.role,
138 videoQuota: body.videoQuota 139 videoQuota: body.videoQuota
139 }) 140 })
@@ -162,6 +163,7 @@ async function registerUser (req: express.Request) {
162 password: body.password, 163 password: body.password,
163 email: body.email, 164 email: body.email,
164 displayNSFW: false, 165 displayNSFW: false,
166 autoPlayVideo: true,
165 role: UserRole.USER, 167 role: UserRole.USER,
166 videoQuota: CONFIG.USER.VIDEO_QUOTA 168 videoQuota: CONFIG.USER.VIDEO_QUOTA
167 }) 169 })
@@ -219,6 +221,7 @@ async function updateMe (req: express.Request, res: express.Response, next: expr
219 if (body.password !== undefined) user.password = body.password 221 if (body.password !== undefined) user.password = body.password
220 if (body.email !== undefined) user.email = body.email 222 if (body.email !== undefined) user.email = body.email
221 if (body.displayNSFW !== undefined) user.displayNSFW = body.displayNSFW 223 if (body.displayNSFW !== undefined) user.displayNSFW = body.displayNSFW
224 if (body.autoPlayVideo !== undefined) user.autoPlayVideo = body.autoPlayVideo
222 225
223 await user.save() 226 await user.save()
224 227