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/models/account/account-video-rate.ts | 5 ++--- server/models/redundancy/video-redundancy.ts | 14 ++++++++------ server/models/user/user-notification.ts | 2 +- server/models/video/video-import.ts | 2 +- server/models/video/video.ts | 21 +++++++++++++++------ 5 files changed, 27 insertions(+), 17 deletions(-) (limited to 'server/models') diff --git a/server/models/account/account-video-rate.ts b/server/models/account/account-video-rate.ts index 218561952..e89d31adf 100644 --- a/server/models/account/account-video-rate.ts +++ b/server/models/account/account-video-rate.ts @@ -6,10 +6,9 @@ import { MAccountVideoRateAccountUrl, MAccountVideoRateAccountVideo, MAccountVideoRateFormattable -} from '@server/types/models/video/video-rate' +} from '@server/types/models' +import { AccountVideoRate, VideoRateType } from '@shared/models' import { AttributesOnly } from '@shared/typescript-utils' -import { AccountVideoRate } from '../../../shared' -import { VideoRateType } from '../../../shared/models/videos' import { isActivityPubUrlValid } from '../../helpers/custom-validators/activitypub/misc' import { CONSTRAINTS_FIELDS, VIDEO_RATE_TYPES } from '../../initializers/constants' import { ActorModel } from '../actor/actor' diff --git a/server/models/redundancy/video-redundancy.ts b/server/models/redundancy/video-redundancy.ts index 7e4c7ddf2..6f84747da 100644 --- a/server/models/redundancy/video-redundancy.ts +++ b/server/models/redundancy/video-redundancy.ts @@ -16,15 +16,17 @@ import { } from 'sequelize-typescript' import { getServerActor } from '@server/models/application/application' import { MActor, MVideoForRedundancyAPI, MVideoRedundancy, MVideoRedundancyAP, MVideoRedundancyVideo } from '@server/types/models' -import { AttributesOnly } from '@shared/typescript-utils' -import { VideoRedundanciesTarget } from '@shared/models/redundancy/video-redundancies-filters.model' import { + CacheFileObject, FileRedundancyInformation, StreamingPlaylistRedundancyInformation, - VideoRedundancy -} from '@shared/models/redundancy/video-redundancy.model' -import { CacheFileObject, VideoPrivacy } from '../../../shared' -import { VideoRedundancyStrategy, VideoRedundancyStrategyWithManual } from '../../../shared/models/redundancy' + VideoPrivacy, + VideoRedundanciesTarget, + VideoRedundancy, + VideoRedundancyStrategy, + VideoRedundancyStrategyWithManual +} from '@shared/models' +import { AttributesOnly } from '@shared/typescript-utils' import { isTestInstance } from '../../helpers/core-utils' import { isActivityPubUrlValid, isUrlValid } from '../../helpers/custom-validators/activitypub/misc' import { logger } from '../../helpers/logger' diff --git a/server/models/user/user-notification.ts b/server/models/user/user-notification.ts index d71bb4d56..8450ad49e 100644 --- a/server/models/user/user-notification.ts +++ b/server/models/user/user-notification.ts @@ -2,8 +2,8 @@ import { FindOptions, ModelIndexesOptions, Op, WhereOptions } from 'sequelize' import { AllowNull, BelongsTo, Column, CreatedAt, Default, ForeignKey, Is, Model, Scopes, Table, UpdatedAt } from 'sequelize-typescript' import { UserNotificationIncludes, UserNotificationModelForApi } from '@server/types/models/user' import { uuidToShort } from '@shared/core-utils' +import { UserNotification, UserNotificationType } from '@shared/models' import { AttributesOnly } from '@shared/typescript-utils' -import { UserNotification, UserNotificationType } from '../../../shared' import { isBooleanValid } from '../../helpers/custom-validators/misc' import { isUserNotificationTypeValid } from '../../helpers/custom-validators/user-notifications' import { AbuseModel } from '../abuse/abuse' diff --git a/server/models/video/video-import.ts b/server/models/video/video-import.ts index c41085ef9..c5c1a10f4 100644 --- a/server/models/video/video-import.ts +++ b/server/models/video/video-import.ts @@ -15,8 +15,8 @@ import { } 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/models' import { AttributesOnly } from '@shared/typescript-utils' -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' diff --git a/server/models/video/video.ts b/server/models/video/video.ts index 66a9a28fa..1f103f930 100644 --- a/server/models/video/video.ts +++ b/server/models/video/video.ts @@ -33,13 +33,22 @@ import { VideoPathManager } from '@server/lib/video-path-manager' import { getServerActor } from '@server/models/application/application' import { ModelCache } from '@server/models/model-cache' import { buildVideoEmbedPath, buildVideoWatchPath, pick, uuidToShort } from '@shared/core-utils' -import { VideoFile, VideoInclude } from '@shared/models' +import { + ResultList, + ThumbnailType, + UserRight, + Video, + VideoDetails, + VideoFile, + VideoInclude, + VideoObject, + VideoPrivacy, + VideoRateType, + VideoState, + VideoStorage, + VideoStreamingPlaylistType +} from '@shared/models' import { AttributesOnly } from '@shared/typescript-utils' -import { ResultList, UserRight, VideoPrivacy, VideoState } from '../../../shared' -import { VideoObject } from '../../../shared/models/activitypub/objects' -import { Video, VideoDetails, VideoRateType, VideoStorage } from '../../../shared/models/videos' -import { ThumbnailType } from '../../../shared/models/videos/thumbnail.type' -import { VideoStreamingPlaylistType } from '../../../shared/models/videos/video-streaming-playlist.type' import { peertubeTruncate } from '../../helpers/core-utils' import { isActivityPubUrlValid } from '../../helpers/custom-validators/activitypub/misc' import { exists, isBooleanValid } from '../../helpers/custom-validators/misc' -- cgit v1.2.3