aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api
diff options
context:
space:
mode:
Diffstat (limited to 'server/controllers/api')
-rw-r--r--server/controllers/api/users.ts26
1 files changed, 20 insertions, 6 deletions
diff --git a/server/controllers/api/users.ts b/server/controllers/api/users.ts
index 05639fbec..6e5d09695 100644
--- a/server/controllers/api/users.ts
+++ b/server/controllers/api/users.ts
@@ -6,21 +6,35 @@ import { UserCreate, UserRight, UserRole, UserUpdate, UserUpdateMe, UserVideoRat
6import { unlinkPromise } from '../../helpers/core-utils' 6import { unlinkPromise } from '../../helpers/core-utils'
7import { retryTransactionWrapper } from '../../helpers/database-utils' 7import { retryTransactionWrapper } from '../../helpers/database-utils'
8import { logger } from '../../helpers/logger' 8import { logger } from '../../helpers/logger'
9import { createReqFiles, generateRandomString, getFormattedObjects } from '../../helpers/utils' 9import { createReqFiles, getFormattedObjects } from '../../helpers/utils'
10import { AVATAR_MIMETYPE_EXT, AVATARS_SIZE, CONFIG, sequelizeTypescript } from '../../initializers' 10import { AVATAR_MIMETYPE_EXT, AVATARS_SIZE, CONFIG, sequelizeTypescript } from '../../initializers'
11import { updateActorAvatarInstance } from '../../lib/activitypub' 11import { updateActorAvatarInstance } from '../../lib/activitypub'
12import { sendUpdateUser } from '../../lib/activitypub/send' 12import { sendUpdateUser } from '../../lib/activitypub/send'
13import { Emailer } from '../../lib/emailer' 13import { Emailer } from '../../lib/emailer'
14import { EmailPayload } from '../../lib/job-queue/handlers/email'
15import { Redis } from '../../lib/redis' 14import { Redis } from '../../lib/redis'
16import { createUserAccountAndChannel } from '../../lib/user' 15import { createUserAccountAndChannel } from '../../lib/user'
17import { 16import {
18 asyncMiddleware, authenticate, ensureUserHasRight, ensureUserRegistrationAllowed, paginationValidator, setDefaultSort, 17 asyncMiddleware,
19 setDefaultPagination, token, usersAddValidator, usersGetValidator, usersRegisterValidator, usersRemoveValidator, usersSortValidator, 18 authenticate,
20 usersUpdateMeValidator, usersUpdateValidator, usersVideoRatingValidator 19 ensureUserHasRight,
20 ensureUserRegistrationAllowed,
21 paginationValidator,
22 setDefaultPagination,
23 setDefaultSort,
24 token,
25 usersAddValidator,
26 usersGetValidator,
27 usersRegisterValidator,
28 usersRemoveValidator,
29 usersSortValidator,
30 usersUpdateMeValidator,
31 usersUpdateValidator,
32 usersVideoRatingValidator
21} from '../../middlewares' 33} from '../../middlewares'
22import { 34import {
23 usersAskResetPasswordValidator, usersResetPasswordValidator, usersUpdateMyAvatarValidator, 35 usersAskResetPasswordValidator,
36 usersResetPasswordValidator,
37 usersUpdateMyAvatarValidator,
24 videosSortValidator 38 videosSortValidator
25} from '../../middlewares/validators' 39} from '../../middlewares/validators'
26import { AccountVideoRateModel } from '../../models/account/account-video-rate' 40import { AccountVideoRateModel } from '../../models/account/account-video-rate'