diff options
Diffstat (limited to 'server/models')
-rw-r--r-- | server/models/account/account-video-rate.ts | 5 | ||||
-rw-r--r-- | server/models/redundancy/video-redundancy.ts | 14 | ||||
-rw-r--r-- | server/models/user/user-notification.ts | 2 | ||||
-rw-r--r-- | server/models/video/video-import.ts | 2 | ||||
-rw-r--r-- | server/models/video/video.ts | 21 |
5 files changed, 27 insertions, 17 deletions
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 { | |||
6 | MAccountVideoRateAccountUrl, | 6 | MAccountVideoRateAccountUrl, |
7 | MAccountVideoRateAccountVideo, | 7 | MAccountVideoRateAccountVideo, |
8 | MAccountVideoRateFormattable | 8 | MAccountVideoRateFormattable |
9 | } from '@server/types/models/video/video-rate' | 9 | } from '@server/types/models' |
10 | import { AccountVideoRate, VideoRateType } from '@shared/models' | ||
10 | import { AttributesOnly } from '@shared/typescript-utils' | 11 | import { AttributesOnly } from '@shared/typescript-utils' |
11 | import { AccountVideoRate } from '../../../shared' | ||
12 | import { VideoRateType } from '../../../shared/models/videos' | ||
13 | import { isActivityPubUrlValid } from '../../helpers/custom-validators/activitypub/misc' | 12 | import { isActivityPubUrlValid } from '../../helpers/custom-validators/activitypub/misc' |
14 | import { CONSTRAINTS_FIELDS, VIDEO_RATE_TYPES } from '../../initializers/constants' | 13 | import { CONSTRAINTS_FIELDS, VIDEO_RATE_TYPES } from '../../initializers/constants' |
15 | import { ActorModel } from '../actor/actor' | 14 | 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 { | |||
16 | } from 'sequelize-typescript' | 16 | } from 'sequelize-typescript' |
17 | import { getServerActor } from '@server/models/application/application' | 17 | import { getServerActor } from '@server/models/application/application' |
18 | import { MActor, MVideoForRedundancyAPI, MVideoRedundancy, MVideoRedundancyAP, MVideoRedundancyVideo } from '@server/types/models' | 18 | import { MActor, MVideoForRedundancyAPI, MVideoRedundancy, MVideoRedundancyAP, MVideoRedundancyVideo } from '@server/types/models' |
19 | import { AttributesOnly } from '@shared/typescript-utils' | ||
20 | import { VideoRedundanciesTarget } from '@shared/models/redundancy/video-redundancies-filters.model' | ||
21 | import { | 19 | import { |
20 | CacheFileObject, | ||
22 | FileRedundancyInformation, | 21 | FileRedundancyInformation, |
23 | StreamingPlaylistRedundancyInformation, | 22 | StreamingPlaylistRedundancyInformation, |
24 | VideoRedundancy | 23 | VideoPrivacy, |
25 | } from '@shared/models/redundancy/video-redundancy.model' | 24 | VideoRedundanciesTarget, |
26 | import { CacheFileObject, VideoPrivacy } from '../../../shared' | 25 | VideoRedundancy, |
27 | import { VideoRedundancyStrategy, VideoRedundancyStrategyWithManual } from '../../../shared/models/redundancy' | 26 | VideoRedundancyStrategy, |
27 | VideoRedundancyStrategyWithManual | ||
28 | } from '@shared/models' | ||
29 | import { AttributesOnly } from '@shared/typescript-utils' | ||
28 | import { isTestInstance } from '../../helpers/core-utils' | 30 | import { isTestInstance } from '../../helpers/core-utils' |
29 | import { isActivityPubUrlValid, isUrlValid } from '../../helpers/custom-validators/activitypub/misc' | 31 | import { isActivityPubUrlValid, isUrlValid } from '../../helpers/custom-validators/activitypub/misc' |
30 | import { logger } from '../../helpers/logger' | 32 | 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' | |||
2 | import { AllowNull, BelongsTo, Column, CreatedAt, Default, ForeignKey, Is, Model, Scopes, Table, UpdatedAt } from 'sequelize-typescript' | 2 | import { AllowNull, BelongsTo, Column, CreatedAt, Default, ForeignKey, Is, Model, Scopes, Table, UpdatedAt } from 'sequelize-typescript' |
3 | import { UserNotificationIncludes, UserNotificationModelForApi } from '@server/types/models/user' | 3 | import { UserNotificationIncludes, UserNotificationModelForApi } from '@server/types/models/user' |
4 | import { uuidToShort } from '@shared/core-utils' | 4 | import { uuidToShort } from '@shared/core-utils' |
5 | import { UserNotification, UserNotificationType } from '@shared/models' | ||
5 | import { AttributesOnly } from '@shared/typescript-utils' | 6 | import { AttributesOnly } from '@shared/typescript-utils' |
6 | import { UserNotification, UserNotificationType } from '../../../shared' | ||
7 | import { isBooleanValid } from '../../helpers/custom-validators/misc' | 7 | import { isBooleanValid } from '../../helpers/custom-validators/misc' |
8 | import { isUserNotificationTypeValid } from '../../helpers/custom-validators/user-notifications' | 8 | import { isUserNotificationTypeValid } from '../../helpers/custom-validators/user-notifications' |
9 | import { AbuseModel } from '../abuse/abuse' | 9 | 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 { | |||
15 | } from 'sequelize-typescript' | 15 | } from 'sequelize-typescript' |
16 | import { afterCommitIfTransaction } from '@server/helpers/database-utils' | 16 | import { afterCommitIfTransaction } from '@server/helpers/database-utils' |
17 | import { MVideoImportDefault, MVideoImportFormattable } from '@server/types/models/video/video-import' | 17 | import { MVideoImportDefault, MVideoImportFormattable } from '@server/types/models/video/video-import' |
18 | import { VideoImport, VideoImportState } from '@shared/models' | ||
18 | import { AttributesOnly } from '@shared/typescript-utils' | 19 | import { AttributesOnly } from '@shared/typescript-utils' |
19 | import { VideoImport, VideoImportState } from '../../../shared' | ||
20 | import { isVideoImportStateValid, isVideoImportTargetUrlValid } from '../../helpers/custom-validators/video-imports' | 20 | import { isVideoImportStateValid, isVideoImportTargetUrlValid } from '../../helpers/custom-validators/video-imports' |
21 | import { isVideoMagnetUriValid } from '../../helpers/custom-validators/videos' | 21 | import { isVideoMagnetUriValid } from '../../helpers/custom-validators/videos' |
22 | import { CONSTRAINTS_FIELDS, VIDEO_IMPORT_STATES } from '../../initializers/constants' | 22 | 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' | |||
33 | import { getServerActor } from '@server/models/application/application' | 33 | import { getServerActor } from '@server/models/application/application' |
34 | import { ModelCache } from '@server/models/model-cache' | 34 | import { ModelCache } from '@server/models/model-cache' |
35 | import { buildVideoEmbedPath, buildVideoWatchPath, pick, uuidToShort } from '@shared/core-utils' | 35 | import { buildVideoEmbedPath, buildVideoWatchPath, pick, uuidToShort } from '@shared/core-utils' |
36 | import { VideoFile, VideoInclude } from '@shared/models' | 36 | import { |
37 | ResultList, | ||
38 | ThumbnailType, | ||
39 | UserRight, | ||
40 | Video, | ||
41 | VideoDetails, | ||
42 | VideoFile, | ||
43 | VideoInclude, | ||
44 | VideoObject, | ||
45 | VideoPrivacy, | ||
46 | VideoRateType, | ||
47 | VideoState, | ||
48 | VideoStorage, | ||
49 | VideoStreamingPlaylistType | ||
50 | } from '@shared/models' | ||
37 | import { AttributesOnly } from '@shared/typescript-utils' | 51 | import { AttributesOnly } from '@shared/typescript-utils' |
38 | import { ResultList, UserRight, VideoPrivacy, VideoState } from '../../../shared' | ||
39 | import { VideoObject } from '../../../shared/models/activitypub/objects' | ||
40 | import { Video, VideoDetails, VideoRateType, VideoStorage } from '../../../shared/models/videos' | ||
41 | import { ThumbnailType } from '../../../shared/models/videos/thumbnail.type' | ||
42 | import { VideoStreamingPlaylistType } from '../../../shared/models/videos/video-streaming-playlist.type' | ||
43 | import { peertubeTruncate } from '../../helpers/core-utils' | 52 | import { peertubeTruncate } from '../../helpers/core-utils' |
44 | import { isActivityPubUrlValid } from '../../helpers/custom-validators/activitypub/misc' | 53 | import { isActivityPubUrlValid } from '../../helpers/custom-validators/activitypub/misc' |
45 | import { exists, isBooleanValid } from '../../helpers/custom-validators/misc' | 54 | import { exists, isBooleanValid } from '../../helpers/custom-validators/misc' |