X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Fmodels%2Fvideo%2Fschedule-video-update.ts;h=1e56562e1974dae3f4f198036b6719a692796ea8;hb=4a9e71c2b1ef57de01cd04984348b3957ebbc21d;hp=3cf5f6c99b06591fe81260f6479553d348d0eedc;hpb=bbe0f0645ca958d33a3f409b15166609733b663f;p=github%2FChocobozzz%2FPeerTube.git 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 { return ScheduleVideoUpdateModel.findAll(query) } + static deleteByVideoId (videoId: number, t: Transaction) { + const query = { + where: { + videoId + }, + transaction: t + } + + return ScheduleVideoUpdateModel.destroy(query) + } + toFormattedJSON () { return { updateAt: this.updateAt,