diff options
Diffstat (limited to 'server/controllers/api/users/me.ts')
-rw-r--r-- | server/controllers/api/users/me.ts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/server/controllers/api/users/me.ts b/server/controllers/api/users/me.ts index b490518fc..3d2a325fe 100644 --- a/server/controllers/api/users/me.ts +++ b/server/controllers/api/users/me.ts | |||
@@ -28,6 +28,7 @@ import { AccountVideoRateModel } from '../../../models/account/account-video-rat | |||
28 | import { UserModel } from '../../../models/account/user' | 28 | import { UserModel } from '../../../models/account/user' |
29 | import { VideoModel } from '../../../models/video/video' | 29 | import { VideoModel } from '../../../models/video/video' |
30 | import { VideoImportModel } from '../../../models/video/video-import' | 30 | import { VideoImportModel } from '../../../models/video/video-import' |
31 | import { HttpStatusCode } from '../../../../shared/core-utils/miscs/http-error-codes' | ||
31 | 32 | ||
32 | const reqAvatarFile = createReqFiles([ 'avatarfile' ], MIMETYPES.IMAGE.MIMETYPE_EXT, { avatarfile: CONFIG.STORAGE.TMP_DIR }) | 33 | const reqAvatarFile = createReqFiles([ 'avatarfile' ], MIMETYPES.IMAGE.MIMETYPE_EXT, { avatarfile: CONFIG.STORAGE.TMP_DIR }) |
33 | 34 | ||
@@ -162,7 +163,7 @@ async function deleteMe (req: express.Request, res: express.Response) { | |||
162 | 163 | ||
163 | await user.destroy() | 164 | await user.destroy() |
164 | 165 | ||
165 | return res.sendStatus(204) | 166 | return res.sendStatus(HttpStatusCode.NO_CONTENT_204) |
166 | } | 167 | } |
167 | 168 | ||
168 | async function updateMe (req: express.Request, res: express.Response) { | 169 | async function updateMe (req: express.Request, res: express.Response) { |
@@ -210,7 +211,7 @@ async function updateMe (req: express.Request, res: express.Response) { | |||
210 | await sendVerifyUserEmail(user, true) | 211 | await sendVerifyUserEmail(user, true) |
211 | } | 212 | } |
212 | 213 | ||
213 | return res.sendStatus(204) | 214 | return res.sendStatus(HttpStatusCode.NO_CONTENT_204) |
214 | } | 215 | } |
215 | 216 | ||
216 | async function updateMyAvatar (req: express.Request, res: express.Response) { | 217 | async function updateMyAvatar (req: express.Request, res: express.Response) { |