From d17c7b4e8c52317bdc874917387b7a49f6cf8b01 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 24 Dec 2021 10:14:47 +0100 Subject: Fix shared imports --- server/middlewares/validators/videos/video-captions.ts | 2 +- server/middlewares/validators/videos/video-comments.ts | 3 +-- server/middlewares/validators/videos/video-files.ts | 2 +- server/middlewares/validators/videos/video-playlists.ts | 12 ++++++++---- server/middlewares/validators/videos/videos.ts | 4 +--- 5 files changed, 12 insertions(+), 11 deletions(-) (limited to 'server/middlewares/validators') 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 @@ import express from 'express' import { body, param } from 'express-validator' -import { UserRight } from '../../../../shared' +import { UserRight } from '@shared/models' import { isVideoCaptionFile, isVideoCaptionLanguageValid } from '../../../helpers/custom-validators/video-captions' import { cleanUpReqFiles } from '../../../helpers/express-utils' 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 @@ import express from 'express' import { body, param, query } from 'express-validator' import { MUserAccountUrl } from '@server/types/models' -import { UserRight } from '../../../../shared' -import { HttpStatusCode } from '../../../../shared/models/http/http-error-codes' +import { HttpStatusCode, UserRight } from '@shared/models' import { exists, isBooleanValid, isIdValid, toBooleanOrNull } from '../../../helpers/custom-validators/misc' import { isValidVideoCommentText } from '../../../helpers/custom-validators/video-comments' 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 @@ import express from 'express' import { MVideo } from '@server/types/models' -import { HttpStatusCode } from '../../../../shared' +import { HttpStatusCode } from '@shared/models' import { logger } from '../../../helpers/logger' import { areValidationErrors, doesVideoExist, isValidVideoIdParam } from '../shared' 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' import { body, param, query, ValidationChain } from 'express-validator' import { ExpressPromiseHandler } from '@server/types/express' import { MUserAccountId } from '@server/types/models' -import { UserRight, VideoPlaylistCreate, VideoPlaylistUpdate } from '../../../../shared' -import { HttpStatusCode } from '../../../../shared/models/http/http-error-codes' -import { VideoPlaylistPrivacy } from '../../../../shared/models/videos/playlist/video-playlist-privacy.model' -import { VideoPlaylistType } from '../../../../shared/models/videos/playlist/video-playlist-type.model' +import { + HttpStatusCode, + UserRight, + VideoPlaylistCreate, + VideoPlaylistPrivacy, + VideoPlaylistType, + VideoPlaylistUpdate +} from '@shared/models' import { isArrayOf, 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' import { ExpressPromiseHandler } from '@server/types/express' import { MUserAccountId, MVideoFullLight } from '@server/types/models' import { getAllPrivacies } from '@shared/core-utils' -import { VideoInclude } from '@shared/models' -import { ServerErrorCode, UserRight, VideoPrivacy } from '../../../../shared' -import { HttpStatusCode } from '../../../../shared/models/http/http-error-codes' +import { HttpStatusCode, ServerErrorCode, UserRight, VideoInclude, VideoPrivacy } from '@shared/models' import { exists, isBooleanValid, -- cgit v1.2.3