aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models
diff options
context:
space:
mode:
Diffstat (limited to 'server/models')
-rw-r--r--server/models/account/account-video-rate.ts2
-rw-r--r--server/models/account/user.ts2
-rw-r--r--server/models/activitypub/actor-follow.ts2
-rw-r--r--server/models/activitypub/actor.ts2
-rw-r--r--server/models/avatar/avatar.ts2
-rw-r--r--server/models/redundancy/video-redundancy.ts2
-rw-r--r--server/models/utils.ts1
-rw-r--r--server/models/video/video-abuse.ts2
-rw-r--r--server/models/video/video-blacklist.ts2
-rw-r--r--server/models/video/video-caption.ts2
-rw-r--r--server/models/video/video-channel.ts2
-rw-r--r--server/models/video/video-comment.ts2
-rw-r--r--server/models/video/video-format-utils.ts2
-rw-r--r--server/models/video/video-import.ts2
-rw-r--r--server/models/video/video-playlist-element.ts2
-rw-r--r--server/models/video/video-playlist.ts2
-rw-r--r--server/models/video/video-share.ts2
-rw-r--r--server/models/video/video-streaming-playlist.ts2
-rw-r--r--server/models/video/video.ts2
19 files changed, 18 insertions, 19 deletions
diff --git a/server/models/account/account-video-rate.ts b/server/models/account/account-video-rate.ts
index f462df4b3..78a897a65 100644
--- a/server/models/account/account-video-rate.ts
+++ b/server/models/account/account-video-rate.ts
@@ -3,7 +3,7 @@ import { Transaction, Op } from 'sequelize'
3import { AllowNull, BelongsTo, Column, CreatedAt, DataType, ForeignKey, Is, Model, Table, UpdatedAt } from 'sequelize-typescript' 3import { AllowNull, BelongsTo, Column, CreatedAt, DataType, ForeignKey, Is, Model, Table, UpdatedAt } from 'sequelize-typescript'
4import { IFindOptions } from 'sequelize-typescript/lib/interfaces/IFindOptions' 4import { IFindOptions } from 'sequelize-typescript/lib/interfaces/IFindOptions'
5import { VideoRateType } from '../../../shared/models/videos' 5import { VideoRateType } from '../../../shared/models/videos'
6import { CONSTRAINTS_FIELDS, VIDEO_RATE_TYPES } from '../../initializers' 6import { CONSTRAINTS_FIELDS, VIDEO_RATE_TYPES } from '../../initializers/constants'
7import { VideoModel } from '../video/video' 7import { VideoModel } from '../video/video'
8import { AccountModel } from './account' 8import { AccountModel } from './account'
9import { ActorModel } from '../activitypub/actor' 9import { ActorModel } from '../activitypub/actor'
diff --git a/server/models/account/user.ts b/server/models/account/user.ts
index 8aff9f497..38585c016 100644
--- a/server/models/account/user.ts
+++ b/server/models/account/user.ts
@@ -42,7 +42,7 @@ import { VideoChannelModel } from '../video/video-channel'
42import { AccountModel } from './account' 42import { AccountModel } from './account'
43import { NSFWPolicyType } from '../../../shared/models/videos/nsfw-policy.type' 43import { NSFWPolicyType } from '../../../shared/models/videos/nsfw-policy.type'
44import { values } from 'lodash' 44import { values } from 'lodash'
45import { NSFW_POLICY_TYPES } from '../../initializers' 45import { NSFW_POLICY_TYPES } from '../../initializers/constants'
46import { clearCacheByUserId } from '../../lib/oauth-model' 46import { clearCacheByUserId } from '../../lib/oauth-model'
47import { UserNotificationSettingModel } from './user-notification-setting' 47import { UserNotificationSettingModel } from './user-notification-setting'
48import { VideoModel } from '../video/video' 48import { VideoModel } from '../video/video'
diff --git a/server/models/activitypub/actor-follow.ts b/server/models/activitypub/actor-follow.ts
index e3eeb7dae..1b272e1c8 100644
--- a/server/models/activitypub/actor-follow.ts
+++ b/server/models/activitypub/actor-follow.ts
@@ -22,7 +22,7 @@ import { FollowState } from '../../../shared/models/actors'
22import { ActorFollow } from '../../../shared/models/actors/follow.model' 22import { ActorFollow } from '../../../shared/models/actors/follow.model'
23import { logger } from '../../helpers/logger' 23import { logger } from '../../helpers/logger'
24import { getServerActor } from '../../helpers/utils' 24import { getServerActor } from '../../helpers/utils'
25import { ACTOR_FOLLOW_SCORE } from '../../initializers' 25import { ACTOR_FOLLOW_SCORE } from '../../initializers/constants'
26import { FOLLOW_STATES } from '../../initializers/constants' 26import { FOLLOW_STATES } from '../../initializers/constants'
27import { ServerModel } from '../server/server' 27import { ServerModel } from '../server/server'
28import { getSort } from '../utils' 28import { getSort } from '../utils'
diff --git a/server/models/activitypub/actor.ts b/server/models/activitypub/actor.ts
index 5472c8b92..e8f603031 100644
--- a/server/models/activitypub/actor.ts
+++ b/server/models/activitypub/actor.ts
@@ -30,7 +30,7 @@ import {
30 isActorPublicKeyValid 30 isActorPublicKeyValid
31} from '../../helpers/custom-validators/activitypub/actor' 31} from '../../helpers/custom-validators/activitypub/actor'
32import { isActivityPubUrlValid } from '../../helpers/custom-validators/activitypub/misc' 32import { isActivityPubUrlValid } from '../../helpers/custom-validators/activitypub/misc'
33import { ACTIVITY_PUB, ACTIVITY_PUB_ACTOR_TYPES, CONSTRAINTS_FIELDS, WEBSERVER } from '../../initializers' 33import { ACTIVITY_PUB, ACTIVITY_PUB_ACTOR_TYPES, CONSTRAINTS_FIELDS, WEBSERVER } from '../../initializers/constants'
34import { AccountModel } from '../account/account' 34import { AccountModel } from '../account/account'
35import { AvatarModel } from '../avatar/avatar' 35import { AvatarModel } from '../avatar/avatar'
36import { ServerModel } from '../server/server' 36import { ServerModel } from '../server/server'
diff --git a/server/models/avatar/avatar.ts b/server/models/avatar/avatar.ts
index 455835524..aaf1b8bd9 100644
--- a/server/models/avatar/avatar.ts
+++ b/server/models/avatar/avatar.ts
@@ -1,7 +1,7 @@
1import { join } from 'path' 1import { join } from 'path'
2import { AfterDestroy, AllowNull, Column, CreatedAt, Model, Table, UpdatedAt } from 'sequelize-typescript' 2import { AfterDestroy, AllowNull, Column, CreatedAt, Model, Table, UpdatedAt } from 'sequelize-typescript'
3import { Avatar } from '../../../shared/models/avatars/avatar.model' 3import { Avatar } from '../../../shared/models/avatars/avatar.model'
4import { STATIC_PATHS } from '../../initializers' 4import { STATIC_PATHS } from '../../initializers/constants'
5import { logger } from '../../helpers/logger' 5import { logger } from '../../helpers/logger'
6import { remove } from 'fs-extra' 6import { remove } from 'fs-extra'
7import { CONFIG } from '../../initializers/config' 7import { CONFIG } from '../../initializers/config'
diff --git a/server/models/redundancy/video-redundancy.ts b/server/models/redundancy/video-redundancy.ts
index 39c50be5c..2b8e44223 100644
--- a/server/models/redundancy/video-redundancy.ts
+++ b/server/models/redundancy/video-redundancy.ts
@@ -15,7 +15,7 @@ import {
15import { ActorModel } from '../activitypub/actor' 15import { ActorModel } from '../activitypub/actor'
16import { getVideoSort, throwIfNotValid } from '../utils' 16import { getVideoSort, throwIfNotValid } from '../utils'
17import { isActivityPubUrlValid, isUrlValid } from '../../helpers/custom-validators/activitypub/misc' 17import { isActivityPubUrlValid, isUrlValid } from '../../helpers/custom-validators/activitypub/misc'
18import { CONSTRAINTS_FIELDS, MIMETYPES } from '../../initializers' 18import { CONSTRAINTS_FIELDS, MIMETYPES } from '../../initializers/constants'
19import { VideoFileModel } from '../video/video-file' 19import { VideoFileModel } from '../video/video-file'
20import { getServerActor } from '../../helpers/utils' 20import { getServerActor } from '../../helpers/utils'
21import { VideoModel } from '../video/video' 21import { VideoModel } from '../video/video'
diff --git a/server/models/utils.ts b/server/models/utils.ts
index f8a71b270..a478bc62b 100644
--- a/server/models/utils.ts
+++ b/server/models/utils.ts
@@ -1,6 +1,5 @@
1import { Sequelize } from 'sequelize-typescript' 1import { Sequelize } from 'sequelize-typescript'
2import * as validator from 'validator' 2import * as validator from 'validator'
3import { ACTIVITY_PUB } from '../initializers'
4 3
5type SortType = { sortModel: any, sortValue: string } 4type SortType = { sortModel: any, sortValue: string }
6 5
diff --git a/server/models/video/video-abuse.ts b/server/models/video/video-abuse.ts
index cc47644f2..eacd651cc 100644
--- a/server/models/video/video-abuse.ts
+++ b/server/models/video/video-abuse.ts
@@ -10,7 +10,7 @@ import { AccountModel } from '../account/account'
10import { getSort, throwIfNotValid } from '../utils' 10import { getSort, throwIfNotValid } from '../utils'
11import { VideoModel } from './video' 11import { VideoModel } from './video'
12import { VideoAbuseState } from '../../../shared' 12import { VideoAbuseState } from '../../../shared'
13import { CONSTRAINTS_FIELDS, VIDEO_ABUSE_STATES } from '../../initializers' 13import { CONSTRAINTS_FIELDS, VIDEO_ABUSE_STATES } from '../../initializers/constants'
14 14
15@Table({ 15@Table({
16 tableName: 'videoAbuse', 16 tableName: 'videoAbuse',
diff --git a/server/models/video/video-blacklist.ts b/server/models/video/video-blacklist.ts
index 86b1f6acb..2619b4950 100644
--- a/server/models/video/video-blacklist.ts
+++ b/server/models/video/video-blacklist.ts
@@ -16,7 +16,7 @@ import { VideoModel } from './video'
16import { VideoChannelModel, ScopeNames as VideoChannelScopeNames } from './video-channel' 16import { VideoChannelModel, ScopeNames as VideoChannelScopeNames } from './video-channel'
17import { isVideoBlacklistReasonValid, isVideoBlacklistTypeValid } from '../../helpers/custom-validators/video-blacklist' 17import { isVideoBlacklistReasonValid, isVideoBlacklistTypeValid } from '../../helpers/custom-validators/video-blacklist'
18import { VideoBlacklist, VideoBlacklistType } from '../../../shared/models/videos' 18import { VideoBlacklist, VideoBlacklistType } from '../../../shared/models/videos'
19import { CONSTRAINTS_FIELDS } from '../../initializers' 19import { CONSTRAINTS_FIELDS } from '../../initializers/constants'
20 20
21@Table({ 21@Table({
22 tableName: 'videoBlacklist', 22 tableName: 'videoBlacklist',
diff --git a/server/models/video/video-caption.ts b/server/models/video/video-caption.ts
index c670bce71..f2dbbfde8 100644
--- a/server/models/video/video-caption.ts
+++ b/server/models/video/video-caption.ts
@@ -16,7 +16,7 @@ import { throwIfNotValid } from '../utils'
16import { VideoModel } from './video' 16import { VideoModel } from './video'
17import { isVideoCaptionLanguageValid } from '../../helpers/custom-validators/video-captions' 17import { isVideoCaptionLanguageValid } from '../../helpers/custom-validators/video-captions'
18import { VideoCaption } from '../../../shared/models/videos/caption/video-caption.model' 18import { VideoCaption } from '../../../shared/models/videos/caption/video-caption.model'
19import { STATIC_PATHS, VIDEO_LANGUAGES } from '../../initializers' 19import { STATIC_PATHS, VIDEO_LANGUAGES } from '../../initializers/constants'
20import { join } from 'path' 20import { join } from 'path'
21import { logger } from '../../helpers/logger' 21import { logger } from '../../helpers/logger'
22import { remove } from 'fs-extra' 22import { remove } from 'fs-extra'
diff --git a/server/models/video/video-channel.ts b/server/models/video/video-channel.ts
index 1abc23eaa..5b5075344 100644
--- a/server/models/video/video-channel.ts
+++ b/server/models/video/video-channel.ts
@@ -29,7 +29,7 @@ import { AccountModel, ScopeNames as AccountModelScopeNames } from '../account/a
29import { ActorModel, unusedActorAttributesForAPI } from '../activitypub/actor' 29import { ActorModel, unusedActorAttributesForAPI } from '../activitypub/actor'
30import { buildServerIdsFollowedBy, buildTrigramSearchIndex, createSimilarityAttribute, getSort, throwIfNotValid } from '../utils' 30import { buildServerIdsFollowedBy, buildTrigramSearchIndex, createSimilarityAttribute, getSort, throwIfNotValid } from '../utils'
31import { VideoModel } from './video' 31import { VideoModel } from './video'
32import { CONSTRAINTS_FIELDS, WEBSERVER } from '../../initializers' 32import { CONSTRAINTS_FIELDS, WEBSERVER } from '../../initializers/constants'
33import { ServerModel } from '../server/server' 33import { ServerModel } from '../server/server'
34import { DefineIndexesOptions } from 'sequelize' 34import { DefineIndexesOptions } from 'sequelize'
35import { AvatarModel } from '../avatar/avatar' 35import { AvatarModel } from '../avatar/avatar'
diff --git a/server/models/video/video-comment.ts b/server/models/video/video-comment.ts
index 47f1cbb99..cb5f1cbbe 100644
--- a/server/models/video/video-comment.ts
+++ b/server/models/video/video-comment.ts
@@ -18,7 +18,7 @@ import { ActivityTagObject } from '../../../shared/models/activitypub/objects/co
18import { VideoCommentObject } from '../../../shared/models/activitypub/objects/video-comment-object' 18import { VideoCommentObject } from '../../../shared/models/activitypub/objects/video-comment-object'
19import { VideoComment } from '../../../shared/models/videos/video-comment.model' 19import { VideoComment } from '../../../shared/models/videos/video-comment.model'
20import { isActivityPubUrlValid } from '../../helpers/custom-validators/activitypub/misc' 20import { isActivityPubUrlValid } from '../../helpers/custom-validators/activitypub/misc'
21import { CONSTRAINTS_FIELDS, WEBSERVER } from '../../initializers' 21import { CONSTRAINTS_FIELDS, WEBSERVER } from '../../initializers/constants'
22import { sendDeleteVideoComment } from '../../lib/activitypub/send' 22import { sendDeleteVideoComment } from '../../lib/activitypub/send'
23import { AccountModel } from '../account/account' 23import { AccountModel } from '../account/account'
24import { ActorModel } from '../activitypub/actor' 24import { ActorModel } from '../activitypub/actor'
diff --git a/server/models/video/video-format-utils.ts b/server/models/video/video-format-utils.ts
index 7915fc1f9..64771b1ff 100644
--- a/server/models/video/video-format-utils.ts
+++ b/server/models/video/video-format-utils.ts
@@ -7,7 +7,7 @@ import {
7 ActivityUrlObject, 7 ActivityUrlObject,
8 VideoTorrentObject 8 VideoTorrentObject
9} from '../../../shared/models/activitypub/objects' 9} from '../../../shared/models/activitypub/objects'
10import { MIMETYPES, THUMBNAILS_SIZE, WEBSERVER } from '../../initializers' 10import { MIMETYPES, THUMBNAILS_SIZE, WEBSERVER } from '../../initializers/constants'
11import { VideoCaptionModel } from './video-caption' 11import { VideoCaptionModel } from './video-caption'
12import { 12import {
13 getVideoCommentsActivityPubUrl, 13 getVideoCommentsActivityPubUrl,
diff --git a/server/models/video/video-import.ts b/server/models/video/video-import.ts
index 9bc0f17f5..ec10085d6 100644
--- a/server/models/video/video-import.ts
+++ b/server/models/video/video-import.ts
@@ -13,7 +13,7 @@ import {
13 Table, 13 Table,
14 UpdatedAt 14 UpdatedAt
15} from 'sequelize-typescript' 15} from 'sequelize-typescript'
16import { CONSTRAINTS_FIELDS, VIDEO_IMPORT_STATES } from '../../initializers' 16import { CONSTRAINTS_FIELDS, VIDEO_IMPORT_STATES } from '../../initializers/constants'
17import { getSort, throwIfNotValid } from '../utils' 17import { getSort, throwIfNotValid } from '../utils'
18import { ScopeNames as VideoModelScopeNames, VideoModel } from './video' 18import { ScopeNames as VideoModelScopeNames, VideoModel } from './video'
19import { isVideoImportStateValid, isVideoImportTargetUrlValid } from '../../helpers/custom-validators/video-imports' 19import { isVideoImportStateValid, isVideoImportTargetUrlValid } from '../../helpers/custom-validators/video-imports'
diff --git a/server/models/video/video-playlist-element.ts b/server/models/video/video-playlist-element.ts
index a2bd225a1..3396b1136 100644
--- a/server/models/video/video-playlist-element.ts
+++ b/server/models/video/video-playlist-element.ts
@@ -18,7 +18,7 @@ import { VideoPlaylistModel } from './video-playlist'
18import * as Sequelize from 'sequelize' 18import * as Sequelize from 'sequelize'
19import { getSort, throwIfNotValid } from '../utils' 19import { getSort, throwIfNotValid } from '../utils'
20import { isActivityPubUrlValid } from '../../helpers/custom-validators/activitypub/misc' 20import { isActivityPubUrlValid } from '../../helpers/custom-validators/activitypub/misc'
21import { CONSTRAINTS_FIELDS } from '../../initializers' 21import { CONSTRAINTS_FIELDS } from '../../initializers/constants'
22import { PlaylistElementObject } from '../../../shared/models/activitypub/objects/playlist-element-object' 22import { PlaylistElementObject } from '../../../shared/models/activitypub/objects/playlist-element-object'
23import * as validator from 'validator' 23import * as validator from 'validator'
24 24
diff --git a/server/models/video/video-playlist.ts b/server/models/video/video-playlist.ts
index 93f36a9d0..0725b752a 100644
--- a/server/models/video/video-playlist.ts
+++ b/server/models/video/video-playlist.ts
@@ -32,7 +32,7 @@ import {
32 VIDEO_PLAYLIST_PRIVACIES, 32 VIDEO_PLAYLIST_PRIVACIES,
33 VIDEO_PLAYLIST_TYPES, 33 VIDEO_PLAYLIST_TYPES,
34 WEBSERVER 34 WEBSERVER
35} from '../../initializers' 35} from '../../initializers/constants'
36import { VideoPlaylist } from '../../../shared/models/videos/playlist/video-playlist.model' 36import { VideoPlaylist } from '../../../shared/models/videos/playlist/video-playlist.model'
37import { AccountModel, ScopeNames as AccountScopeNames } from '../account/account' 37import { AccountModel, ScopeNames as AccountScopeNames } from '../account/account'
38import { ScopeNames as VideoChannelScopeNames, VideoChannelModel } from './video-channel' 38import { ScopeNames as VideoChannelScopeNames, VideoChannelModel } from './video-channel'
diff --git a/server/models/video/video-share.ts b/server/models/video/video-share.ts
index 399081564..c83f6c5b0 100644
--- a/server/models/video/video-share.ts
+++ b/server/models/video/video-share.ts
@@ -2,7 +2,7 @@ import * as Sequelize from 'sequelize'
2import * as Bluebird from 'bluebird' 2import * as Bluebird from 'bluebird'
3import { AllowNull, BelongsTo, Column, CreatedAt, DataType, ForeignKey, Is, Model, Scopes, Table, UpdatedAt } from 'sequelize-typescript' 3import { AllowNull, BelongsTo, Column, CreatedAt, DataType, ForeignKey, Is, Model, Scopes, Table, UpdatedAt } from 'sequelize-typescript'
4import { isActivityPubUrlValid } from '../../helpers/custom-validators/activitypub/misc' 4import { isActivityPubUrlValid } from '../../helpers/custom-validators/activitypub/misc'
5import { CONSTRAINTS_FIELDS } from '../../initializers' 5import { CONSTRAINTS_FIELDS } from '../../initializers/constants'
6import { AccountModel } from '../account/account' 6import { AccountModel } from '../account/account'
7import { ActorModel } from '../activitypub/actor' 7import { ActorModel } from '../activitypub/actor'
8import { throwIfNotValid } from '../utils' 8import { throwIfNotValid } from '../utils'
diff --git a/server/models/video/video-streaming-playlist.ts b/server/models/video/video-streaming-playlist.ts
index 0333755c5..e50b5d106 100644
--- a/server/models/video/video-streaming-playlist.ts
+++ b/server/models/video/video-streaming-playlist.ts
@@ -6,7 +6,7 @@ import * as Sequelize from 'sequelize'
6import { VideoRedundancyModel } from '../redundancy/video-redundancy' 6import { VideoRedundancyModel } from '../redundancy/video-redundancy'
7import { VideoStreamingPlaylistType } from '../../../shared/models/videos/video-streaming-playlist.type' 7import { VideoStreamingPlaylistType } from '../../../shared/models/videos/video-streaming-playlist.type'
8import { isActivityPubUrlValid } from '../../helpers/custom-validators/activitypub/misc' 8import { isActivityPubUrlValid } from '../../helpers/custom-validators/activitypub/misc'
9import { CONSTRAINTS_FIELDS, STATIC_PATHS, P2P_MEDIA_LOADER_PEER_VERSION } from '../../initializers' 9import { CONSTRAINTS_FIELDS, STATIC_PATHS, P2P_MEDIA_LOADER_PEER_VERSION } from '../../initializers/constants'
10import { VideoFileModel } from './video-file' 10import { VideoFileModel } from './video-file'
11import { join } from 'path' 11import { join } from 'path'
12import { sha1 } from '../../helpers/core-utils' 12import { sha1 } from '../../helpers/core-utils'
diff --git a/server/models/video/video.ts b/server/models/video/video.ts
index 3b30e9e28..38447797e 100644
--- a/server/models/video/video.ts
+++ b/server/models/video/video.ts
@@ -65,7 +65,7 @@ import {
65 VIDEO_PRIVACIES, 65 VIDEO_PRIVACIES,
66 VIDEO_STATES, 66 VIDEO_STATES,
67 WEBSERVER 67 WEBSERVER
68} from '../../initializers' 68} from '../../initializers/constants'
69import { sendDeleteVideo } from '../../lib/activitypub/send' 69import { sendDeleteVideo } from '../../lib/activitypub/send'
70import { AccountModel } from '../account/account' 70import { AccountModel } from '../account/account'
71import { AccountVideoRateModel } from '../account/account-video-rate' 71import { AccountVideoRateModel } from '../account/account-video-rate'