From 7d9ba5c08999c6482f0bc5e0c09c6f55b7724090 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 11 May 2021 11:15:29 +0200 Subject: Cleanup models directory organization --- server/models/video/video-channel.ts | 6 +++--- server/models/video/video-comment.ts | 2 +- server/models/video/video-import.ts | 4 ++-- server/models/video/video-playlist.ts | 2 +- server/models/video/video-share.ts | 2 +- server/models/video/video.ts | 8 ++++---- 6 files changed, 12 insertions(+), 12 deletions(-) (limited to 'server/models/video') diff --git a/server/models/video/video-channel.ts b/server/models/video/video-channel.ts index 081b21f2d..8e4b78723 100644 --- a/server/models/video/video-channel.ts +++ b/server/models/video/video-channel.ts @@ -36,9 +36,9 @@ import { MChannelSummaryFormattable } from '../../types/models/video' import { AccountModel, ScopeNames as AccountModelScopeNames, SummaryOptions as AccountSummaryOptions } from '../account/account' -import { ActorImageModel } from '../account/actor-image' -import { ActorModel, unusedActorAttributesForAPI } from '../activitypub/actor' -import { ActorFollowModel } from '../activitypub/actor-follow' +import { ActorModel, unusedActorAttributesForAPI } from '../actor/actor' +import { ActorFollowModel } from '../actor/actor-follow' +import { ActorImageModel } from '../actor/actor-image' import { ServerModel } from '../server/server' import { buildServerIdsFollowedBy, buildTrigramSearchIndex, createSimilarityAttribute, getSort, throwIfNotValid } from '../utils' import { VideoModel } from './video' diff --git a/server/models/video/video-comment.ts b/server/models/video/video-comment.ts index 151c2bc81..87c66dc9f 100644 --- a/server/models/video/video-comment.ts +++ b/server/models/video/video-comment.ts @@ -39,7 +39,7 @@ import { } from '../../types/models/video' import { VideoCommentAbuseModel } from '../abuse/video-comment-abuse' import { AccountModel } from '../account/account' -import { ActorModel, unusedActorAttributesForAPI } from '../activitypub/actor' +import { ActorModel, unusedActorAttributesForAPI } from '../actor/actor' import { buildBlockedAccountSQL, buildBlockedAccountSQLOptimized, diff --git a/server/models/video/video-import.ts b/server/models/video/video-import.ts index 8324166cc..d8f09e1e5 100644 --- a/server/models/video/video-import.ts +++ b/server/models/video/video-import.ts @@ -13,15 +13,15 @@ import { Table, UpdatedAt } from 'sequelize-typescript' +import { afterCommitIfTransaction } from '@server/helpers/database-utils' import { MVideoImportDefault, MVideoImportFormattable } from '@server/types/models/video/video-import' import { VideoImport, VideoImportState } from '../../../shared' import { isVideoImportStateValid, isVideoImportTargetUrlValid } from '../../helpers/custom-validators/video-imports' import { isVideoMagnetUriValid } from '../../helpers/custom-validators/videos' import { CONSTRAINTS_FIELDS, VIDEO_IMPORT_STATES } from '../../initializers/constants' -import { UserModel } from '../account/user' +import { UserModel } from '../user/user' import { getSort, throwIfNotValid } from '../utils' import { ScopeNames as VideoModelScopeNames, VideoModel } from './video' -import { afterCommitIfTransaction } from '@server/helpers/database-utils' @DefaultScope(() => ({ include: [ diff --git a/server/models/video/video-playlist.ts b/server/models/video/video-playlist.ts index efe5be36d..b48dd2945 100644 --- a/server/models/video/video-playlist.ts +++ b/server/models/video/video-playlist.ts @@ -50,11 +50,11 @@ import { MVideoPlaylistIdWithElements } from '../../types/models/video/video-playlist' import { AccountModel, ScopeNames as AccountScopeNames, SummaryOptions } from '../account/account' +import { ActorModel } from '../actor/actor' import { buildServerIdsFollowedBy, buildWhereIdOrUUID, getPlaylistSort, isOutdated, throwIfNotValid } from '../utils' import { ThumbnailModel } from './thumbnail' import { ScopeNames as VideoChannelScopeNames, VideoChannelModel } from './video-channel' import { VideoPlaylistElementModel } from './video-playlist-element' -import { ActorModel } from '../activitypub/actor' enum ScopeNames { AVAILABLE_FOR_LIST = 'AVAILABLE_FOR_LIST', diff --git a/server/models/video/video-share.ts b/server/models/video/video-share.ts index 5059c1fa6..99a24dbdf 100644 --- a/server/models/video/video-share.ts +++ b/server/models/video/video-share.ts @@ -4,7 +4,7 @@ import { isActivityPubUrlValid } from '../../helpers/custom-validators/activityp import { CONSTRAINTS_FIELDS } from '../../initializers/constants' import { MActorDefault } from '../../types/models' import { MVideoShareActor, MVideoShareFull } from '../../types/models/video' -import { ActorModel } from '../activitypub/actor' +import { ActorModel } from '../actor/actor' import { buildLocalActorIdsIn, throwIfNotValid } from '../utils' import { VideoModel } from './video' diff --git a/server/models/video/video.ts b/server/models/video/video.ts index 8c316e00c..f8a099d9c 100644 --- a/server/models/video/video.ts +++ b/server/models/video/video.ts @@ -100,14 +100,14 @@ import { MVideoFile, MVideoFileStreamingPlaylistVideo } from '../../types/models import { VideoAbuseModel } from '../abuse/video-abuse' import { AccountModel } from '../account/account' import { AccountVideoRateModel } from '../account/account-video-rate' -import { ActorImageModel } from '../account/actor-image' -import { UserModel } from '../account/user' -import { UserVideoHistoryModel } from '../account/user-video-history' -import { ActorModel } from '../activitypub/actor' +import { ActorModel } from '../actor/actor' +import { ActorImageModel } from '../actor/actor-image' import { VideoRedundancyModel } from '../redundancy/video-redundancy' import { ServerModel } from '../server/server' import { TrackerModel } from '../server/tracker' import { VideoTrackerModel } from '../server/video-tracker' +import { UserModel } from '../user/user' +import { UserVideoHistoryModel } from '../user/user-video-history' import { buildTrigramSearchIndex, buildWhereIdOrUUID, getVideoSort, isOutdated, throwIfNotValid } from '../utils' import { ScheduleVideoUpdateModel } from './schedule-video-update' import { TagModel } from './tag' -- cgit v1.2.3