diff options
Diffstat (limited to 'server/middlewares/validators/users.ts')
-rw-r--r-- | server/middlewares/validators/users.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/server/middlewares/validators/users.ts b/server/middlewares/validators/users.ts index 90a46752c..38f8aed5b 100644 --- a/server/middlewares/validators/users.ts +++ b/server/middlewares/validators/users.ts | |||
@@ -15,7 +15,7 @@ function usersAddValidator (req: express.Request, res: express.Response, next: e | |||
15 | 15 | ||
16 | logger.debug('Checking usersAdd parameters', { parameters: req.body }) | 16 | logger.debug('Checking usersAdd parameters', { parameters: req.body }) |
17 | 17 | ||
18 | checkErrors(req, res, function () { | 18 | checkErrors(req, res, () => { |
19 | db.User.loadByUsernameOrEmail(req.body.username, req.body.email) | 19 | db.User.loadByUsernameOrEmail(req.body.username, req.body.email) |
20 | .then(user => { | 20 | .then(user => { |
21 | if (user) return res.status(409).send('User already exists.') | 21 | if (user) return res.status(409).send('User already exists.') |
@@ -34,7 +34,7 @@ function usersRemoveValidator (req: express.Request, res: express.Response, next | |||
34 | 34 | ||
35 | logger.debug('Checking usersRemove parameters', { parameters: req.params }) | 35 | logger.debug('Checking usersRemove parameters', { parameters: req.params }) |
36 | 36 | ||
37 | checkErrors(req, res, function () { | 37 | checkErrors(req, res, () => { |
38 | db.User.loadById(req.params.id) | 38 | db.User.loadById(req.params.id) |
39 | .then(user => { | 39 | .then(user => { |
40 | if (!user) return res.status(404).send('User not found') | 40 | if (!user) return res.status(404).send('User not found') |
@@ -66,7 +66,7 @@ function usersVideoRatingValidator (req: express.Request, res: express.Response, | |||
66 | 66 | ||
67 | logger.debug('Checking usersVideoRating parameters', { parameters: req.params }) | 67 | logger.debug('Checking usersVideoRating parameters', { parameters: req.params }) |
68 | 68 | ||
69 | checkErrors(req, res, function () { | 69 | checkErrors(req, res, () => { |
70 | let videoPromise: Promise<VideoInstance> | 70 | let videoPromise: Promise<VideoInstance> |
71 | 71 | ||
72 | if (validator.isUUID(req.params.videoId)) { | 72 | if (validator.isUUID(req.params.videoId)) { |