diff options
Diffstat (limited to 'server/middlewares')
-rw-r--r-- | server/middlewares/activitypub.ts | 3 | ||||
-rw-r--r-- | server/middlewares/user-right.ts | 3 | ||||
-rw-r--r-- | server/middlewares/validators/videos/video-captions.ts | 2 | ||||
-rw-r--r-- | server/middlewares/validators/videos/video-comments.ts | 3 | ||||
-rw-r--r-- | server/middlewares/validators/videos/video-files.ts | 2 | ||||
-rw-r--r-- | server/middlewares/validators/videos/video-playlists.ts | 12 | ||||
-rw-r--r-- | server/middlewares/validators/videos/videos.ts | 4 |
7 files changed, 14 insertions, 15 deletions
diff --git a/server/middlewares/activitypub.ts b/server/middlewares/activitypub.ts index 6ef90b275..86d3c1d6c 100644 --- a/server/middlewares/activitypub.ts +++ b/server/middlewares/activitypub.ts | |||
@@ -1,8 +1,7 @@ | |||
1 | import { NextFunction, Request, Response } from 'express' | 1 | import { NextFunction, Request, Response } from 'express' |
2 | import { getAPId } from '@server/helpers/activitypub' | 2 | import { getAPId } from '@server/helpers/activitypub' |
3 | import { isActorDeleteActivityValid } from '@server/helpers/custom-validators/activitypub/actor' | 3 | import { isActorDeleteActivityValid } from '@server/helpers/custom-validators/activitypub/actor' |
4 | import { ActivityDelete, ActivityPubSignature } from '../../shared' | 4 | import { ActivityDelete, ActivityPubSignature, HttpStatusCode } from '@shared/models' |
5 | import { HttpStatusCode } from '../../shared/models/http/http-error-codes' | ||
6 | import { logger } from '../helpers/logger' | 5 | import { logger } from '../helpers/logger' |
7 | import { isHTTPSignatureVerified, isJsonLDSignatureVerified, parseHTTPSignature } from '../helpers/peertube-crypto' | 6 | import { isHTTPSignatureVerified, isJsonLDSignatureVerified, parseHTTPSignature } from '../helpers/peertube-crypto' |
8 | import { ACCEPT_HEADERS, ACTIVITY_PUB, HTTP_SIGNATURE } from '../initializers/constants' | 7 | import { ACCEPT_HEADERS, ACTIVITY_PUB, HTTP_SIGNATURE } from '../initializers/constants' |
diff --git a/server/middlewares/user-right.ts b/server/middlewares/user-right.ts index ea95b16c2..7d53e8341 100644 --- a/server/middlewares/user-right.ts +++ b/server/middlewares/user-right.ts | |||
@@ -1,6 +1,5 @@ | |||
1 | import express from 'express' | 1 | import express from 'express' |
2 | import { UserRight } from '../../shared' | 2 | import { HttpStatusCode, UserRight } from '@shared/models' |
3 | import { HttpStatusCode } from '../../shared/models/http/http-error-codes' | ||
4 | import { logger } from '../helpers/logger' | 3 | import { logger } from '../helpers/logger' |
5 | 4 | ||
6 | function ensureUserHasRight (userRight: UserRight) { | 5 | function ensureUserHasRight (userRight: UserRight) { |
diff --git a/server/middlewares/validators/videos/video-captions.ts b/server/middlewares/validators/videos/video-captions.ts index 38321ccf9..47c491b4c 100644 --- a/server/middlewares/validators/videos/video-captions.ts +++ b/server/middlewares/validators/videos/video-captions.ts | |||
@@ -1,6 +1,6 @@ | |||
1 | import express from 'express' | 1 | import express from 'express' |
2 | import { body, param } from 'express-validator' | 2 | import { body, param } from 'express-validator' |
3 | import { UserRight } from '../../../../shared' | 3 | import { UserRight } from '@shared/models' |
4 | import { isVideoCaptionFile, isVideoCaptionLanguageValid } from '../../../helpers/custom-validators/video-captions' | 4 | import { isVideoCaptionFile, isVideoCaptionLanguageValid } from '../../../helpers/custom-validators/video-captions' |
5 | import { cleanUpReqFiles } from '../../../helpers/express-utils' | 5 | import { cleanUpReqFiles } from '../../../helpers/express-utils' |
6 | import { logger } from '../../../helpers/logger' | 6 | import { logger } from '../../../helpers/logger' |
diff --git a/server/middlewares/validators/videos/video-comments.ts b/server/middlewares/validators/videos/video-comments.ts index 3ea8bdcbb..665fb04c8 100644 --- a/server/middlewares/validators/videos/video-comments.ts +++ b/server/middlewares/validators/videos/video-comments.ts | |||
@@ -1,8 +1,7 @@ | |||
1 | import express from 'express' | 1 | import express from 'express' |
2 | import { body, param, query } from 'express-validator' | 2 | import { body, param, query } from 'express-validator' |
3 | import { MUserAccountUrl } from '@server/types/models' | 3 | import { MUserAccountUrl } from '@server/types/models' |
4 | import { UserRight } from '../../../../shared' | 4 | import { HttpStatusCode, UserRight } from '@shared/models' |
5 | import { HttpStatusCode } from '../../../../shared/models/http/http-error-codes' | ||
6 | import { exists, isBooleanValid, isIdValid, toBooleanOrNull } from '../../../helpers/custom-validators/misc' | 5 | import { exists, isBooleanValid, isIdValid, toBooleanOrNull } from '../../../helpers/custom-validators/misc' |
7 | import { isValidVideoCommentText } from '../../../helpers/custom-validators/video-comments' | 6 | import { isValidVideoCommentText } from '../../../helpers/custom-validators/video-comments' |
8 | import { logger } from '../../../helpers/logger' | 7 | import { logger } from '../../../helpers/logger' |
diff --git a/server/middlewares/validators/videos/video-files.ts b/server/middlewares/validators/videos/video-files.ts index c1fa77502..35b0ac757 100644 --- a/server/middlewares/validators/videos/video-files.ts +++ b/server/middlewares/validators/videos/video-files.ts | |||
@@ -1,6 +1,6 @@ | |||
1 | import express from 'express' | 1 | import express from 'express' |
2 | import { MVideo } from '@server/types/models' | 2 | import { MVideo } from '@server/types/models' |
3 | import { HttpStatusCode } from '../../../../shared' | 3 | import { HttpStatusCode } from '@shared/models' |
4 | import { logger } from '../../../helpers/logger' | 4 | import { logger } from '../../../helpers/logger' |
5 | import { areValidationErrors, doesVideoExist, isValidVideoIdParam } from '../shared' | 5 | import { areValidationErrors, doesVideoExist, isValidVideoIdParam } from '../shared' |
6 | 6 | ||
diff --git a/server/middlewares/validators/videos/video-playlists.ts b/server/middlewares/validators/videos/video-playlists.ts index 8f5c75fd5..ec5a3a9c8 100644 --- a/server/middlewares/validators/videos/video-playlists.ts +++ b/server/middlewares/validators/videos/video-playlists.ts | |||
@@ -2,10 +2,14 @@ import express from 'express' | |||
2 | import { body, param, query, ValidationChain } from 'express-validator' | 2 | import { body, param, query, ValidationChain } from 'express-validator' |
3 | import { ExpressPromiseHandler } from '@server/types/express' | 3 | import { ExpressPromiseHandler } from '@server/types/express' |
4 | import { MUserAccountId } from '@server/types/models' | 4 | import { MUserAccountId } from '@server/types/models' |
5 | import { UserRight, VideoPlaylistCreate, VideoPlaylistUpdate } from '../../../../shared' | 5 | import { |
6 | import { HttpStatusCode } from '../../../../shared/models/http/http-error-codes' | 6 | HttpStatusCode, |
7 | import { VideoPlaylistPrivacy } from '../../../../shared/models/videos/playlist/video-playlist-privacy.model' | 7 | UserRight, |
8 | import { VideoPlaylistType } from '../../../../shared/models/videos/playlist/video-playlist-type.model' | 8 | VideoPlaylistCreate, |
9 | VideoPlaylistPrivacy, | ||
10 | VideoPlaylistType, | ||
11 | VideoPlaylistUpdate | ||
12 | } from '@shared/models' | ||
9 | import { | 13 | import { |
10 | isArrayOf, | 14 | isArrayOf, |
11 | isIdOrUUIDValid, | 15 | isIdOrUUIDValid, |
diff --git a/server/middlewares/validators/videos/videos.ts b/server/middlewares/validators/videos/videos.ts index 3ebdbc33d..1e727533b 100644 --- a/server/middlewares/validators/videos/videos.ts +++ b/server/middlewares/validators/videos/videos.ts | |||
@@ -8,9 +8,7 @@ import { getServerActor } from '@server/models/application/application' | |||
8 | import { ExpressPromiseHandler } from '@server/types/express' | 8 | import { ExpressPromiseHandler } from '@server/types/express' |
9 | import { MUserAccountId, MVideoFullLight } from '@server/types/models' | 9 | import { MUserAccountId, MVideoFullLight } from '@server/types/models' |
10 | import { getAllPrivacies } from '@shared/core-utils' | 10 | import { getAllPrivacies } from '@shared/core-utils' |
11 | import { VideoInclude } from '@shared/models' | 11 | import { HttpStatusCode, ServerErrorCode, UserRight, VideoInclude, VideoPrivacy } from '@shared/models' |
12 | import { ServerErrorCode, UserRight, VideoPrivacy } from '../../../../shared' | ||
13 | import { HttpStatusCode } from '../../../../shared/models/http/http-error-codes' | ||
14 | import { | 12 | import { |
15 | exists, | 13 | exists, |
16 | isBooleanValid, | 14 | isBooleanValid, |