aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/middlewares
diff options
context:
space:
mode:
Diffstat (limited to 'server/middlewares')
-rw-r--r--server/middlewares/cache.ts2
-rw-r--r--server/middlewares/sort.ts2
-rw-r--r--server/middlewares/validators/avatar.ts2
-rw-r--r--server/middlewares/validators/users.ts2
-rw-r--r--server/middlewares/validators/video-captions.ts2
-rw-r--r--server/middlewares/validators/video-imports.ts2
-rw-r--r--server/middlewares/validators/videos.ts2
7 files changed, 7 insertions, 7 deletions
diff --git a/server/middlewares/cache.ts b/server/middlewares/cache.ts
index c671b88c9..b40486e4b 100644
--- a/server/middlewares/cache.ts
+++ b/server/middlewares/cache.ts
@@ -1,6 +1,6 @@
1import * as express from 'express' 1import * as express from 'express'
2import * as AsyncLock from 'async-lock' 2import * as AsyncLock from 'async-lock'
3import { parseDuration } from '../helpers/utils' 3import { parseDuration } from '../helpers/core-utils'
4import { Redis } from '../lib/redis' 4import { Redis } from '../lib/redis'
5import { logger } from '../helpers/logger' 5import { logger } from '../helpers/logger'
6 6
diff --git a/server/middlewares/sort.ts b/server/middlewares/sort.ts
index 5120804b3..6507aa5b8 100644
--- a/server/middlewares/sort.ts
+++ b/server/middlewares/sort.ts
@@ -1,6 +1,6 @@
1import * as express from 'express' 1import * as express from 'express'
2import 'express-validator' 2import 'express-validator'
3import { SortType } from '../helpers/utils' 3import { SortType } from '../models/utils'
4 4
5function setDefaultSort (req: express.Request, res: express.Response, next: express.NextFunction) { 5function setDefaultSort (req: express.Request, res: express.Response, next: express.NextFunction) {
6 if (!req.query.sort) req.query.sort = '-createdAt' 6 if (!req.query.sort) req.query.sort = '-createdAt'
diff --git a/server/middlewares/validators/avatar.ts b/server/middlewares/validators/avatar.ts
index 5860735c6..ddc14f531 100644
--- a/server/middlewares/validators/avatar.ts
+++ b/server/middlewares/validators/avatar.ts
@@ -4,7 +4,7 @@ import { isAvatarFile } from '../../helpers/custom-validators/users'
4import { areValidationErrors } from './utils' 4import { areValidationErrors } from './utils'
5import { CONSTRAINTS_FIELDS } from '../../initializers' 5import { CONSTRAINTS_FIELDS } from '../../initializers'
6import { logger } from '../../helpers/logger' 6import { logger } from '../../helpers/logger'
7import { cleanUpReqFiles } from '../../helpers/utils' 7import { cleanUpReqFiles } from '../../helpers/express-utils'
8 8
9const updateAvatarValidator = [ 9const updateAvatarValidator = [
10 body('avatarfile').custom((value, { req }) => isAvatarFile(req.files)).withMessage( 10 body('avatarfile').custom((value, { req }) => isAvatarFile(req.files)).withMessage(
diff --git a/server/middlewares/validators/users.ts b/server/middlewares/validators/users.ts
index 771c414a0..f47fa8b48 100644
--- a/server/middlewares/validators/users.ts
+++ b/server/middlewares/validators/users.ts
@@ -16,7 +16,7 @@ import {
16} from '../../helpers/custom-validators/users' 16} from '../../helpers/custom-validators/users'
17import { isVideoExist } from '../../helpers/custom-validators/videos' 17import { isVideoExist } from '../../helpers/custom-validators/videos'
18import { logger } from '../../helpers/logger' 18import { logger } from '../../helpers/logger'
19import { isSignupAllowed, isSignupAllowedForCurrentIP } from '../../helpers/utils' 19import { isSignupAllowed, isSignupAllowedForCurrentIP } from '../../helpers/signup'
20import { Redis } from '../../lib/redis' 20import { Redis } from '../../lib/redis'
21import { UserModel } from '../../models/account/user' 21import { UserModel } from '../../models/account/user'
22import { areValidationErrors } from './utils' 22import { areValidationErrors } from './utils'
diff --git a/server/middlewares/validators/video-captions.ts b/server/middlewares/validators/video-captions.ts
index 18d537bc4..4f393ea84 100644
--- a/server/middlewares/validators/video-captions.ts
+++ b/server/middlewares/validators/video-captions.ts
@@ -7,7 +7,7 @@ import { CONSTRAINTS_FIELDS } from '../../initializers'
7import { UserRight } from '../../../shared' 7import { UserRight } from '../../../shared'
8import { logger } from '../../helpers/logger' 8import { logger } from '../../helpers/logger'
9import { isVideoCaptionExist, isVideoCaptionFile, isVideoCaptionLanguageValid } from '../../helpers/custom-validators/video-captions' 9import { isVideoCaptionExist, isVideoCaptionFile, isVideoCaptionLanguageValid } from '../../helpers/custom-validators/video-captions'
10import { cleanUpReqFiles } from '../../helpers/utils' 10import { cleanUpReqFiles } from '../../helpers/express-utils'
11 11
12const addVideoCaptionValidator = [ 12const addVideoCaptionValidator = [
13 param('videoId').custom(isIdOrUUIDValid).not().isEmpty().withMessage('Should have a valid video id'), 13 param('videoId').custom(isIdOrUUIDValid).not().isEmpty().withMessage('Should have a valid video id'),
diff --git a/server/middlewares/validators/video-imports.ts b/server/middlewares/validators/video-imports.ts
index 9ac739101..b2063b8da 100644
--- a/server/middlewares/validators/video-imports.ts
+++ b/server/middlewares/validators/video-imports.ts
@@ -5,7 +5,7 @@ import { logger } from '../../helpers/logger'
5import { areValidationErrors } from './utils' 5import { areValidationErrors } from './utils'
6import { getCommonVideoAttributes } from './videos' 6import { getCommonVideoAttributes } from './videos'
7import { isVideoImportTargetUrlValid, isVideoImportTorrentFile } from '../../helpers/custom-validators/video-imports' 7import { isVideoImportTargetUrlValid, isVideoImportTorrentFile } from '../../helpers/custom-validators/video-imports'
8import { cleanUpReqFiles } from '../../helpers/utils' 8import { cleanUpReqFiles } from '../../helpers/express-utils'
9import { isVideoChannelOfAccountExist, isVideoMagnetUriValid, isVideoNameValid } from '../../helpers/custom-validators/videos' 9import { isVideoChannelOfAccountExist, isVideoMagnetUriValid, isVideoNameValid } from '../../helpers/custom-validators/videos'
10import { CONFIG } from '../../initializers/constants' 10import { CONFIG } from '../../initializers/constants'
11import { CONSTRAINTS_FIELDS } from '../../initializers' 11import { CONSTRAINTS_FIELDS } from '../../initializers'
diff --git a/server/middlewares/validators/videos.ts b/server/middlewares/validators/videos.ts
index 77d601a4d..53c32abb8 100644
--- a/server/middlewares/validators/videos.ts
+++ b/server/middlewares/validators/videos.ts
@@ -34,7 +34,7 @@ import { CONSTRAINTS_FIELDS } from '../../initializers'
34import { VideoShareModel } from '../../models/video/video-share' 34import { VideoShareModel } from '../../models/video/video-share'
35import { authenticate } from '../oauth' 35import { authenticate } from '../oauth'
36import { areValidationErrors } from './utils' 36import { areValidationErrors } from './utils'
37import { cleanUpReqFiles } from '../../helpers/utils' 37import { cleanUpReqFiles } from '../../helpers/express-utils'
38import { VideoModel } from '../../models/video/video' 38import { VideoModel } from '../../models/video/video'
39import { UserModel } from '../../models/account/user' 39import { UserModel } from '../../models/account/user'
40 40