diff options
Diffstat (limited to 'server/controllers/api/users')
-rw-r--r-- | server/controllers/api/users/index.ts | 7 | ||||
-rw-r--r-- | server/controllers/api/users/me.ts | 4 |
2 files changed, 3 insertions, 8 deletions
diff --git a/server/controllers/api/users/index.ts b/server/controllers/api/users/index.ts index fcee58f6b..7efc3a137 100644 --- a/server/controllers/api/users/index.ts +++ b/server/controllers/api/users/index.ts | |||
@@ -4,10 +4,7 @@ import { tokensRouter } from '@server/controllers/api/users/token' | |||
4 | import { Hooks } from '@server/lib/plugins/hooks' | 4 | import { Hooks } from '@server/lib/plugins/hooks' |
5 | import { OAuthTokenModel } from '@server/models/oauth/oauth-token' | 5 | import { OAuthTokenModel } from '@server/models/oauth/oauth-token' |
6 | import { MUser, MUserAccountDefault } from '@server/types/models' | 6 | import { MUser, MUserAccountDefault } from '@server/types/models' |
7 | import { UserCreate, UserCreateResult, UserRight, UserRole, UserUpdate } from '../../../../shared' | 7 | import { HttpStatusCode, UserAdminFlag, UserCreate, UserCreateResult, UserRegister, UserRight, UserRole, UserUpdate } from '@shared/models' |
8 | import { HttpStatusCode } from '../../../../shared/models/http/http-error-codes' | ||
9 | import { UserAdminFlag } from '../../../../shared/models/users/user-flag.model' | ||
10 | import { UserRegister } from '../../../../shared/models/users/user-register.model' | ||
11 | import { auditLoggerFactory, getAuditIdFromRes, UserAuditView } from '../../../helpers/audit-logger' | 8 | import { auditLoggerFactory, getAuditIdFromRes, UserAuditView } from '../../../helpers/audit-logger' |
12 | import { logger } from '../../../helpers/logger' | 9 | import { logger } from '../../../helpers/logger' |
13 | import { generateRandomString, getFormattedObjects } from '../../../helpers/utils' | 10 | import { generateRandomString, getFormattedObjects } from '../../../helpers/utils' |
@@ -210,7 +207,7 @@ async function createUser (req: express.Request, res: express.Response) { | |||
210 | logger.info('Sending to user %s a create password email', body.username) | 207 | logger.info('Sending to user %s a create password email', body.username) |
211 | const verificationString = await Redis.Instance.setCreatePasswordVerificationString(user.id) | 208 | const verificationString = await Redis.Instance.setCreatePasswordVerificationString(user.id) |
212 | const url = WEBSERVER.URL + '/reset-password?userId=' + user.id + '&verificationString=' + verificationString | 209 | const url = WEBSERVER.URL + '/reset-password?userId=' + user.id + '&verificationString=' + verificationString |
213 | await Emailer.Instance.addPasswordCreateEmailJob(userToCreate.username, user.email, url) | 210 | Emailer.Instance.addPasswordCreateEmailJob(userToCreate.username, user.email, url) |
214 | } | 211 | } |
215 | 212 | ||
216 | Hooks.runAction('action:api.user.created', { body, user, account, videoChannel, req, res }) | 213 | Hooks.runAction('action:api.user.created', { body, user, account, videoChannel, req, res }) |
diff --git a/server/controllers/api/users/me.ts b/server/controllers/api/users/me.ts index 127b7ca5d..878dd5a84 100644 --- a/server/controllers/api/users/me.ts +++ b/server/controllers/api/users/me.ts | |||
@@ -2,10 +2,8 @@ import 'multer' | |||
2 | import express from 'express' | 2 | import express from 'express' |
3 | import { auditLoggerFactory, getAuditIdFromRes, UserAuditView } from '@server/helpers/audit-logger' | 3 | import { auditLoggerFactory, getAuditIdFromRes, UserAuditView } from '@server/helpers/audit-logger' |
4 | import { Hooks } from '@server/lib/plugins/hooks' | 4 | import { Hooks } from '@server/lib/plugins/hooks' |
5 | import { ActorImageType, HttpStatusCode, UserUpdateMe, UserVideoQuota, UserVideoRate as FormattedUserVideoRate } from '@shared/models' | ||
5 | import { AttributesOnly } from '@shared/typescript-utils' | 6 | import { AttributesOnly } from '@shared/typescript-utils' |
6 | import { ActorImageType, UserUpdateMe, UserVideoRate as FormattedUserVideoRate } from '../../../../shared' | ||
7 | import { HttpStatusCode } from '../../../../shared/models/http/http-error-codes' | ||
8 | import { UserVideoQuota } from '../../../../shared/models/users/user-video-quota.model' | ||
9 | import { createReqFiles } from '../../../helpers/express-utils' | 7 | import { createReqFiles } from '../../../helpers/express-utils' |
10 | import { getFormattedObjects } from '../../../helpers/utils' | 8 | import { getFormattedObjects } from '../../../helpers/utils' |
11 | import { CONFIG } from '../../../initializers/config' | 9 | import { CONFIG } from '../../../initializers/config' |