diff options
author | Chocobozzz <me@florianbigard.com> | 2020-10-27 16:06:24 +0100 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2020-11-09 15:33:04 +0100 |
commit | 31c82cd914e13dbf53280d0aad0740d70c414441 (patch) | |
tree | e2f5ad1ee0e501f58c971eb89a60fc3b1c633f04 /server/models/video | |
parent | da0310f821b039fea1fcbf8aea49e1d2279ba98e (diff) | |
download | PeerTube-31c82cd914e13dbf53280d0aad0740d70c414441.tar.gz PeerTube-31c82cd914e13dbf53280d0aad0740d70c414441.tar.zst PeerTube-31c82cd914e13dbf53280d0aad0740d70c414441.zip |
Fix replay saving
Diffstat (limited to 'server/models/video')
-rw-r--r-- | server/models/video/video.ts | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/server/models/video/video.ts b/server/models/video/video.ts index 8493ab802..78fec5585 100644 --- a/server/models/video/video.ts +++ b/server/models/video/video.ts | |||
@@ -128,6 +128,7 @@ import { VideoStreamingPlaylistModel } from './video-streaming-playlist' | |||
128 | import { VideoTagModel } from './video-tag' | 128 | import { VideoTagModel } from './video-tag' |
129 | import { VideoViewModel } from './video-view' | 129 | import { VideoViewModel } from './video-view' |
130 | import { LiveManager } from '@server/lib/live-manager' | 130 | import { LiveManager } from '@server/lib/live-manager' |
131 | import { VideoLiveModel } from './video-live' | ||
131 | 132 | ||
132 | export enum ScopeNames { | 133 | export enum ScopeNames { |
133 | AVAILABLE_FOR_LIST_IDS = 'AVAILABLE_FOR_LIST_IDS', | 134 | AVAILABLE_FOR_LIST_IDS = 'AVAILABLE_FOR_LIST_IDS', |
@@ -725,6 +726,15 @@ export class VideoModel extends Model<VideoModel> { | |||
725 | }) | 726 | }) |
726 | VideoBlacklist: VideoBlacklistModel | 727 | VideoBlacklist: VideoBlacklistModel |
727 | 728 | ||
729 | @HasOne(() => VideoLiveModel, { | ||
730 | foreignKey: { | ||
731 | name: 'videoId', | ||
732 | allowNull: false | ||
733 | }, | ||
734 | onDelete: 'cascade' | ||
735 | }) | ||
736 | VideoLive: VideoLiveModel | ||
737 | |||
728 | @HasOne(() => VideoImportModel, { | 738 | @HasOne(() => VideoImportModel, { |
729 | foreignKey: { | 739 | foreignKey: { |
730 | name: 'videoId', | 740 | name: 'videoId', |