From 4c7e60bc17ee5830399bac4aa273356903421b4c Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 16 Jul 2021 14:27:30 +0200 Subject: Reorganize imports --- server/controllers/api/videos/blacklist.ts | 2 +- server/controllers/api/videos/comment.ts | 2 +- server/controllers/api/videos/ownership.ts | 14 +++++++------- server/controllers/api/videos/rate.ts | 4 ++-- server/controllers/api/videos/watching.ts | 2 +- 5 files changed, 12 insertions(+), 12 deletions(-) (limited to 'server/controllers/api/videos') diff --git a/server/controllers/api/videos/blacklist.ts b/server/controllers/api/videos/blacklist.ts index a7f5f53d8..6bc768471 100644 --- a/server/controllers/api/videos/blacklist.ts +++ b/server/controllers/api/videos/blacklist.ts @@ -1,6 +1,7 @@ import * as express from 'express' import { blacklistVideo, unblacklistVideo } from '@server/lib/video-blacklist' import { UserRight, VideoBlacklistCreate } from '../../../../shared' +import { HttpStatusCode } from '../../../../shared/models/http/http-error-codes' import { logger } from '../../../helpers/logger' import { getFormattedObjects } from '../../../helpers/utils' import { sequelizeTypescript } from '../../../initializers/database' @@ -19,7 +20,6 @@ import { videosBlacklistUpdateValidator } from '../../../middlewares' import { VideoBlacklistModel } from '../../../models/video/video-blacklist' -import { HttpStatusCode } from '../../../../shared/models/http/http-error-codes' const blacklistRouter = express.Router() diff --git a/server/controllers/api/videos/comment.ts b/server/controllers/api/videos/comment.ts index 90b633bb5..cb696f652 100644 --- a/server/controllers/api/videos/comment.ts +++ b/server/controllers/api/videos/comment.ts @@ -1,6 +1,6 @@ import * as express from 'express' -import { HttpStatusCode } from '../../../../shared/models/http/http-error-codes' import { ResultList, ThreadsResultList, UserRight, VideoCommentCreate } from '../../../../shared/models' +import { HttpStatusCode } from '../../../../shared/models/http/http-error-codes' import { VideoCommentThreads } from '../../../../shared/models/videos/comment/video-comment.model' import { auditLoggerFactory, CommentAuditView, getAuditIdFromRes } from '../../../helpers/audit-logger' import { getFormattedObjects } from '../../../helpers/utils' diff --git a/server/controllers/api/videos/ownership.ts b/server/controllers/api/videos/ownership.ts index e6c94a45a..f48acbc68 100644 --- a/server/controllers/api/videos/ownership.ts +++ b/server/controllers/api/videos/ownership.ts @@ -1,6 +1,12 @@ import * as express from 'express' +import { MVideoFullLight } from '@server/types/models' +import { HttpStatusCode } from '../../../../shared/models/http/http-error-codes' +import { VideoChangeOwnershipStatus, VideoState } from '../../../../shared/models/videos' import { logger } from '../../../helpers/logger' +import { getFormattedObjects } from '../../../helpers/utils' import { sequelizeTypescript } from '../../../initializers/database' +import { sendUpdateVideo } from '../../../lib/activitypub/send' +import { changeVideoChannelShare } from '../../../lib/activitypub/share' import { asyncMiddleware, asyncRetryTransactionMiddleware, @@ -11,15 +17,9 @@ import { videosChangeOwnershipValidator, videosTerminateChangeOwnershipValidator } from '../../../middlewares' +import { VideoModel } from '../../../models/video/video' import { VideoChangeOwnershipModel } from '../../../models/video/video-change-ownership' -import { VideoChangeOwnershipStatus, VideoState } from '../../../../shared/models/videos' import { VideoChannelModel } from '../../../models/video/video-channel' -import { getFormattedObjects } from '../../../helpers/utils' -import { changeVideoChannelShare } from '../../../lib/activitypub/share' -import { sendUpdateVideo } from '../../../lib/activitypub/send' -import { VideoModel } from '../../../models/video/video' -import { MVideoFullLight } from '@server/types/models' -import { HttpStatusCode } from '../../../../shared/models/http/http-error-codes' const ownershipVideoRouter = express.Router() diff --git a/server/controllers/api/videos/rate.ts b/server/controllers/api/videos/rate.ts index 134c9e5ca..96f6cd886 100644 --- a/server/controllers/api/videos/rate.ts +++ b/server/controllers/api/videos/rate.ts @@ -1,13 +1,13 @@ import * as express from 'express' import { UserVideoRateUpdate } from '../../../../shared' +import { HttpStatusCode } from '../../../../shared/models/http/http-error-codes' import { logger } from '../../../helpers/logger' import { VIDEO_RATE_TYPES } from '../../../initializers/constants' +import { sequelizeTypescript } from '../../../initializers/database' import { getLocalRateUrl, sendVideoRateChange } from '../../../lib/activitypub/video-rates' import { asyncMiddleware, asyncRetryTransactionMiddleware, authenticate, videoUpdateRateValidator } from '../../../middlewares' import { AccountModel } from '../../../models/account/account' import { AccountVideoRateModel } from '../../../models/account/account-video-rate' -import { sequelizeTypescript } from '../../../initializers/database' -import { HttpStatusCode } from '../../../../shared/models/http/http-error-codes' const rateVideoRouter = express.Router() diff --git a/server/controllers/api/videos/watching.ts b/server/controllers/api/videos/watching.ts index 2899dbd9c..05c75e543 100644 --- a/server/controllers/api/videos/watching.ts +++ b/server/controllers/api/videos/watching.ts @@ -1,5 +1,6 @@ import * as express from 'express' import { UserWatchingVideo } from '../../../../shared' +import { HttpStatusCode } from '../../../../shared/models/http/http-error-codes' import { asyncMiddleware, asyncRetryTransactionMiddleware, @@ -8,7 +9,6 @@ import { videoWatchingValidator } from '../../../middlewares' import { UserVideoHistoryModel } from '../../../models/user/user-video-history' -import { HttpStatusCode } from '../../../../shared/models/http/http-error-codes' const watchingRouter = express.Router() -- cgit v1.2.3