aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api/users/index.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/controllers/api/users/index.ts')
-rw-r--r--server/controllers/api/users/index.ts7
1 files changed, 4 insertions, 3 deletions
diff --git a/server/controllers/api/users/index.ts b/server/controllers/api/users/index.ts
index 2117bdfeb..a049e23e4 100644
--- a/server/controllers/api/users/index.ts
+++ b/server/controllers/api/users/index.ts
@@ -3,7 +3,7 @@ import * as RateLimit from 'express-rate-limit'
3import { UserCreate, UserRight, UserRole, UserUpdate } from '../../../../shared' 3import { UserCreate, UserRight, UserRole, UserUpdate } from '../../../../shared'
4import { logger } from '../../../helpers/logger' 4import { logger } from '../../../helpers/logger'
5import { getFormattedObjects } from '../../../helpers/utils' 5import { getFormattedObjects } from '../../../helpers/utils'
6import { CONFIG, RATES_LIMIT, sequelizeTypescript } from '../../../initializers' 6import { RATES_LIMIT, sequelizeTypescript, WEBSERVER } from '../../../initializers'
7import { Emailer } from '../../../lib/emailer' 7import { Emailer } from '../../../lib/emailer'
8import { Redis } from '../../../lib/redis' 8import { Redis } from '../../../lib/redis'
9import { createUserAccountAndChannelAndPlaylist } from '../../../lib/user' 9import { createUserAccountAndChannelAndPlaylist } from '../../../lib/user'
@@ -43,6 +43,7 @@ import { myVideosHistoryRouter } from './my-history'
43import { myNotificationsRouter } from './my-notifications' 43import { myNotificationsRouter } from './my-notifications'
44import { Notifier } from '../../../lib/notifier' 44import { Notifier } from '../../../lib/notifier'
45import { mySubscriptionsRouter } from './my-subscriptions' 45import { mySubscriptionsRouter } from './my-subscriptions'
46import { CONFIG } from '../../../initializers/config'
46 47
47const auditLogger = auditLoggerFactory('users') 48const auditLogger = auditLoggerFactory('users')
48 49
@@ -293,7 +294,7 @@ async function askResetUserPassword (req: express.Request, res: express.Response
293 const user = res.locals.user 294 const user = res.locals.user
294 295
295 const verificationString = await Redis.Instance.setResetPasswordVerificationString(user.id) 296 const verificationString = await Redis.Instance.setResetPasswordVerificationString(user.id)
296 const url = CONFIG.WEBSERVER.URL + '/reset-password?userId=' + user.id + '&verificationString=' + verificationString 297 const url = WEBSERVER.URL + '/reset-password?userId=' + user.id + '&verificationString=' + verificationString
297 await Emailer.Instance.addPasswordResetEmailJob(user.email, url) 298 await Emailer.Instance.addPasswordResetEmailJob(user.email, url)
298 299
299 return res.status(204).end() 300 return res.status(204).end()
@@ -310,7 +311,7 @@ async function resetUserPassword (req: express.Request, res: express.Response) {
310 311
311async function sendVerifyUserEmail (user: UserModel) { 312async function sendVerifyUserEmail (user: UserModel) {
312 const verificationString = await Redis.Instance.setVerifyEmailVerificationString(user.id) 313 const verificationString = await Redis.Instance.setVerifyEmailVerificationString(user.id)
313 const url = CONFIG.WEBSERVER.URL + '/verify-account/email?userId=' + user.id + '&verificationString=' + verificationString 314 const url = WEBSERVER.URL + '/verify-account/email?userId=' + user.id + '&verificationString=' + verificationString
314 await Emailer.Instance.addVerifyEmailJob(user.email, url) 315 await Emailer.Instance.addVerifyEmailJob(user.email, url)
315 return 316 return
316} 317}