aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api/users
diff options
context:
space:
mode:
Diffstat (limited to 'server/controllers/api/users')
-rw-r--r--server/controllers/api/users/me.ts21
1 files changed, 10 insertions, 11 deletions
diff --git a/server/controllers/api/users/me.ts b/server/controllers/api/users/me.ts
index 23890e20c..914c52e27 100644
--- a/server/controllers/api/users/me.ts
+++ b/server/controllers/api/users/me.ts
@@ -1,9 +1,15 @@
1import * as express from 'express'
2import 'multer' 1import 'multer'
3import { UserUpdateMe, UserVideoRate as FormattedUserVideoRate } from '../../../../shared' 2import * as express from 'express'
3import { UserUpdateMe, UserVideoRate as FormattedUserVideoRate, VideoSortField } from '../../../../shared'
4import { UserVideoQuota } from '../../../../shared/models/users/user-video-quota.model'
5import { createReqFiles } from '../../../helpers/express-utils'
4import { getFormattedObjects } from '../../../helpers/utils' 6import { getFormattedObjects } from '../../../helpers/utils'
7import { CONFIG } from '../../../initializers/config'
5import { MIMETYPES } from '../../../initializers/constants' 8import { MIMETYPES } from '../../../initializers/constants'
9import { sequelizeTypescript } from '../../../initializers/database'
6import { sendUpdateActor } from '../../../lib/activitypub/send' 10import { sendUpdateActor } from '../../../lib/activitypub/send'
11import { updateActorAvatarFile } from '../../../lib/avatar'
12import { sendVerifyUserEmail } from '../../../lib/user'
7import { 13import {
8 asyncMiddleware, 14 asyncMiddleware,
9 asyncRetryTransactionMiddleware, 15 asyncRetryTransactionMiddleware,
@@ -15,19 +21,12 @@ import {
15 usersVideoRatingValidator 21 usersVideoRatingValidator
16} from '../../../middlewares' 22} from '../../../middlewares'
17import { deleteMeValidator, videoImportsSortValidator, videosSortValidator } from '../../../middlewares/validators' 23import { deleteMeValidator, videoImportsSortValidator, videosSortValidator } from '../../../middlewares/validators'
24import { updateAvatarValidator } from '../../../middlewares/validators/avatar'
25import { AccountModel } from '../../../models/account/account'
18import { AccountVideoRateModel } from '../../../models/account/account-video-rate' 26import { AccountVideoRateModel } from '../../../models/account/account-video-rate'
19import { UserModel } from '../../../models/account/user' 27import { UserModel } from '../../../models/account/user'
20import { VideoModel } from '../../../models/video/video' 28import { VideoModel } from '../../../models/video/video'
21import { VideoSortField } from '../../../../client/src/app/shared/video/sort-field.type'
22import { createReqFiles } from '../../../helpers/express-utils'
23import { UserVideoQuota } from '../../../../shared/models/users/user-video-quota.model'
24import { updateAvatarValidator } from '../../../middlewares/validators/avatar'
25import { updateActorAvatarFile } from '../../../lib/avatar'
26import { VideoImportModel } from '../../../models/video/video-import' 29import { VideoImportModel } from '../../../models/video/video-import'
27import { AccountModel } from '../../../models/account/account'
28import { CONFIG } from '../../../initializers/config'
29import { sequelizeTypescript } from '../../../initializers/database'
30import { sendVerifyUserEmail } from '../../../lib/user'
31 30
32const reqAvatarFile = createReqFiles([ 'avatarfile' ], MIMETYPES.IMAGE.MIMETYPE_EXT, { avatarfile: CONFIG.STORAGE.TMP_DIR }) 31const reqAvatarFile = createReqFiles([ 'avatarfile' ], MIMETYPES.IMAGE.MIMETYPE_EXT, { avatarfile: CONFIG.STORAGE.TMP_DIR })
33 32