diff options
author | Chocobozzz <me@florianbigard.com> | 2018-06-18 10:24:53 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-06-18 10:26:20 +0200 |
commit | e94fc29706cd8e8fd892182d4de0a3ae80a3820f (patch) | |
tree | 75a6b81bb3b74cbacf06ef27e867fcb134d81a06 /server/models | |
parent | fc11a44ec9d12af915ac72d8106cb934cfcdcbcd (diff) | |
download | PeerTube-e94fc29706cd8e8fd892182d4de0a3ae80a3820f.tar.gz PeerTube-e94fc29706cd8e8fd892182d4de0a3ae80a3820f.tar.zst PeerTube-e94fc29706cd8e8fd892182d4de0a3ae80a3820f.zip |
Fix removing scheduled update
Diffstat (limited to 'server/models')
-rw-r--r-- | server/models/video/schedule-video-update.ts | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/server/models/video/schedule-video-update.ts b/server/models/video/schedule-video-update.ts index 3cf5f6c99..1e56562e1 100644 --- a/server/models/video/schedule-video-update.ts +++ b/server/models/video/schedule-video-update.ts | |||
@@ -83,6 +83,17 @@ export class ScheduleVideoUpdateModel extends Model<ScheduleVideoUpdateModel> { | |||
83 | return ScheduleVideoUpdateModel.findAll(query) | 83 | return ScheduleVideoUpdateModel.findAll(query) |
84 | } | 84 | } |
85 | 85 | ||
86 | static deleteByVideoId (videoId: number, t: Transaction) { | ||
87 | const query = { | ||
88 | where: { | ||
89 | videoId | ||
90 | }, | ||
91 | transaction: t | ||
92 | } | ||
93 | |||
94 | return ScheduleVideoUpdateModel.destroy(query) | ||
95 | } | ||
96 | |||
86 | toFormattedJSON () { | 97 | toFormattedJSON () { |
87 | return { | 98 | return { |
88 | updateAt: this.updateAt, | 99 | updateAt: this.updateAt, |