From 26d6bf6533023326fa017812cf31bbe20c752d36 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 18 Jun 2020 10:45:25 +0200 Subject: Split types and typings --- server/middlewares/validators/follows.ts | 2 +- server/middlewares/validators/users.ts | 2 +- server/middlewares/validators/videos/video-channels.ts | 2 +- server/middlewares/validators/videos/video-comments.ts | 4 ++-- server/middlewares/validators/videos/video-playlists.ts | 4 ++-- server/middlewares/validators/videos/videos.ts | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) (limited to 'server/middlewares') diff --git a/server/middlewares/validators/follows.ts b/server/middlewares/validators/follows.ts index 7808135f7..2c1ddf2df 100644 --- a/server/middlewares/validators/follows.ts +++ b/server/middlewares/validators/follows.ts @@ -9,7 +9,7 @@ import { areValidationErrors } from './utils' import { ActorModel } from '../../models/activitypub/actor' import { loadActorUrlOrGetFromWebfinger } from '../../helpers/webfinger' import { isActorTypeValid, isValidActorHandle } from '../../helpers/custom-validators/activitypub/actor' -import { MActorFollowActorsDefault } from '@server/typings/models' +import { MActorFollowActorsDefault } from '@server/types/models' import { isFollowStateValid } from '@server/helpers/custom-validators/follows' import { getServerActor } from '@server/models/application/application' diff --git a/server/middlewares/validators/users.ts b/server/middlewares/validators/users.ts index 3bdbcdf6a..4a9ed6830 100644 --- a/server/middlewares/validators/users.ts +++ b/server/middlewares/validators/users.ts @@ -35,7 +35,7 @@ import { isThemeNameValid } from '../../helpers/custom-validators/plugins' import { isThemeRegistered } from '../../lib/plugins/theme-utils' import { doesVideoExist } from '../../helpers/middlewares' import { UserRole } from '../../../shared/models/users' -import { MUserDefault } from '@server/typings/models' +import { MUserDefault } from '@server/types/models' import { Hooks } from '@server/lib/plugins/hooks' const usersAddValidator = [ diff --git a/server/middlewares/validators/videos/video-channels.ts b/server/middlewares/validators/videos/video-channels.ts index 6604ae6a8..2e4e755e7 100644 --- a/server/middlewares/validators/videos/video-channels.ts +++ b/server/middlewares/validators/videos/video-channels.ts @@ -1,7 +1,7 @@ import * as express from 'express' import { body, param, query } from 'express-validator' import { VIDEO_CHANNELS } from '@server/initializers/constants' -import { MChannelAccountDefault, MUser } from '@server/typings/models' +import { MChannelAccountDefault, MUser } from '@server/types/models' import { UserRight } from '../../../../shared' import { isActorPreferredUsernameValid } from '../../../helpers/custom-validators/activitypub/actor' import { isBooleanValid, toBooleanOrNull } from '../../../helpers/custom-validators/misc' diff --git a/server/middlewares/validators/videos/video-comments.ts b/server/middlewares/validators/videos/video-comments.ts index 4846a5e9e..ef019fcf9 100644 --- a/server/middlewares/validators/videos/video-comments.ts +++ b/server/middlewares/validators/videos/video-comments.ts @@ -1,6 +1,6 @@ import * as express from 'express' import { body, param } from 'express-validator' -import { MUserAccountUrl } from '@server/typings/models' +import { MUserAccountUrl } from '@server/types/models' import { UserRight } from '../../../../shared' import { isIdOrUUIDValid, isIdValid } from '../../../helpers/custom-validators/misc' import { isValidVideoCommentText } from '../../../helpers/custom-validators/video-comments' @@ -9,7 +9,7 @@ import { doesVideoExist } from '../../../helpers/middlewares' import { AcceptResult, isLocalVideoCommentReplyAccepted, isLocalVideoThreadAccepted } from '../../../lib/moderation' import { Hooks } from '../../../lib/plugins/hooks' import { VideoCommentModel } from '../../../models/video/video-comment' -import { MCommentOwnerVideoReply, MVideo, MVideoFullLight, MVideoId } from '../../../typings/models/video' +import { MCommentOwnerVideoReply, MVideo, MVideoFullLight, MVideoId } from '../../../types/models/video' import { areValidationErrors } from '../utils' const listVideoCommentThreadsValidator = [ diff --git a/server/middlewares/validators/videos/video-playlists.ts b/server/middlewares/validators/videos/video-playlists.ts index 6b15c5464..07fd8533c 100644 --- a/server/middlewares/validators/videos/video-playlists.ts +++ b/server/middlewares/validators/videos/video-playlists.ts @@ -27,8 +27,8 @@ import { authenticatePromiseIfNeeded } from '../../oauth' import { VideoPlaylistPrivacy } from '../../../../shared/models/videos/playlist/video-playlist-privacy.model' import { VideoPlaylistType } from '../../../../shared/models/videos/playlist/video-playlist-type.model' import { doesVideoChannelIdExist, doesVideoExist, doesVideoPlaylistExist, VideoPlaylistFetchType } from '../../../helpers/middlewares' -import { MVideoPlaylist } from '../../../typings/models/video/video-playlist' -import { MUserAccountId } from '@server/typings/models' +import { MVideoPlaylist } from '../../../types/models/video/video-playlist' +import { MUserAccountId } from '@server/types/models' const videoPlaylistsAddValidator = getCommonPlaylistEditAttributes().concat([ body('displayName') diff --git a/server/middlewares/validators/videos/videos.ts b/server/middlewares/validators/videos/videos.ts index 867c05fc1..40a34d3b8 100644 --- a/server/middlewares/validators/videos/videos.ts +++ b/server/middlewares/validators/videos/videos.ts @@ -47,7 +47,7 @@ import { doesVideoExist, doesVideoFileOfVideoExist } from '../../../helpers/middlewares' -import { MVideoFullLight } from '@server/typings/models' +import { MVideoFullLight } from '@server/types/models' import { getVideoWithAttributes } from '../../../helpers/video' import { getServerActor } from '@server/models/application/application' -- cgit v1.2.3