diff options
author | Chocobozzz <me@florianbigard.com> | 2018-01-30 15:16:24 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-01-30 15:16:24 +0100 |
commit | f076daa76a32074cba162459e38fa8c130ad42d0 (patch) | |
tree | ea8a92d6305afa158b7774b65e9e6098cc094b92 /server/controllers/api/users.ts | |
parent | ecb4e35f4e6c7304cb274593c13cb47fd5078b75 (diff) | |
download | PeerTube-f076daa76a32074cba162459e38fa8c130ad42d0.tar.gz PeerTube-f076daa76a32074cba162459e38fa8c130ad42d0.tar.zst PeerTube-f076daa76a32074cba162459e38fa8c130ad42d0.zip |
Add tests for emails
Diffstat (limited to 'server/controllers/api/users.ts')
-rw-r--r-- | server/controllers/api/users.ts | 26 |
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 | |||
6 | import { unlinkPromise } from '../../helpers/core-utils' | 6 | import { unlinkPromise } from '../../helpers/core-utils' |
7 | import { retryTransactionWrapper } from '../../helpers/database-utils' | 7 | import { retryTransactionWrapper } from '../../helpers/database-utils' |
8 | import { logger } from '../../helpers/logger' | 8 | import { logger } from '../../helpers/logger' |
9 | import { createReqFiles, generateRandomString, getFormattedObjects } from '../../helpers/utils' | 9 | import { createReqFiles, getFormattedObjects } from '../../helpers/utils' |
10 | import { AVATAR_MIMETYPE_EXT, AVATARS_SIZE, CONFIG, sequelizeTypescript } from '../../initializers' | 10 | import { AVATAR_MIMETYPE_EXT, AVATARS_SIZE, CONFIG, sequelizeTypescript } from '../../initializers' |
11 | import { updateActorAvatarInstance } from '../../lib/activitypub' | 11 | import { updateActorAvatarInstance } from '../../lib/activitypub' |
12 | import { sendUpdateUser } from '../../lib/activitypub/send' | 12 | import { sendUpdateUser } from '../../lib/activitypub/send' |
13 | import { Emailer } from '../../lib/emailer' | 13 | import { Emailer } from '../../lib/emailer' |
14 | import { EmailPayload } from '../../lib/job-queue/handlers/email' | ||
15 | import { Redis } from '../../lib/redis' | 14 | import { Redis } from '../../lib/redis' |
16 | import { createUserAccountAndChannel } from '../../lib/user' | 15 | import { createUserAccountAndChannel } from '../../lib/user' |
17 | import { | 16 | import { |
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' |
22 | import { | 34 | import { |
23 | usersAskResetPasswordValidator, usersResetPasswordValidator, usersUpdateMyAvatarValidator, | 35 | usersAskResetPasswordValidator, |
36 | usersResetPasswordValidator, | ||
37 | usersUpdateMyAvatarValidator, | ||
24 | videosSortValidator | 38 | videosSortValidator |
25 | } from '../../middlewares/validators' | 39 | } from '../../middlewares/validators' |
26 | import { AccountVideoRateModel } from '../../models/account/account-video-rate' | 40 | import { AccountVideoRateModel } from '../../models/account/account-video-rate' |