From 26b7305a232e547709f433a6edf700bf495935d8 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 13 Aug 2018 16:57:13 +0200 Subject: Add blacklist reason field --- shared/models/videos/index.ts | 2 ++ .../models/videos/video-blacklist-create.model.ts | 3 +++ .../models/videos/video-blacklist-update.model.ts | 3 +++ shared/models/videos/video-blacklist.model.ts | 22 +++++++++++++--------- shared/models/videos/video.model.ts | 3 +++ 5 files changed, 24 insertions(+), 9 deletions(-) create mode 100644 shared/models/videos/video-blacklist-create.model.ts create mode 100644 shared/models/videos/video-blacklist-update.model.ts (limited to 'shared/models') diff --git a/shared/models/videos/index.ts b/shared/models/videos/index.ts index 02bf2b842..b99dd2d8f 100644 --- a/shared/models/videos/index.ts +++ b/shared/models/videos/index.ts @@ -6,6 +6,8 @@ export * from './video-abuse-create.model' export * from './video-abuse.model' export * from './video-abuse-update.model' export * from './video-blacklist.model' +export * from './video-blacklist-create.model' +export * from './video-blacklist-update.model' export * from './video-channel-create.model' export * from './video-channel-update.model' export * from './video-channel.model' diff --git a/shared/models/videos/video-blacklist-create.model.ts b/shared/models/videos/video-blacklist-create.model.ts new file mode 100644 index 000000000..89c69cb56 --- /dev/null +++ b/shared/models/videos/video-blacklist-create.model.ts @@ -0,0 +1,3 @@ +export interface VideoBlacklistCreate { + reason?: string +} diff --git a/shared/models/videos/video-blacklist-update.model.ts b/shared/models/videos/video-blacklist-update.model.ts new file mode 100644 index 000000000..0a86cf7b0 --- /dev/null +++ b/shared/models/videos/video-blacklist-update.model.ts @@ -0,0 +1,3 @@ +export interface VideoBlacklistUpdate { + reason?: string +} diff --git a/shared/models/videos/video-blacklist.model.ts b/shared/models/videos/video-blacklist.model.ts index af04502e8..a060da357 100644 --- a/shared/models/videos/video-blacklist.model.ts +++ b/shared/models/videos/video-blacklist.model.ts @@ -1,14 +1,18 @@ export interface BlacklistedVideo { id: number - videoId: number createdAt: Date updatedAt: Date - name: string - uuid: string - description: string - duration: number - views: number - likes: number - dislikes: number - nsfw: boolean + reason?: string + + video: { + id: number + name: string + uuid: string + description: string + duration: number + views: number + likes: number + dislikes: number + nsfw: boolean + } } diff --git a/shared/models/videos/video.model.ts b/shared/models/videos/video.model.ts index f7bbaac76..8dfa96069 100644 --- a/shared/models/videos/video.model.ts +++ b/shared/models/videos/video.model.ts @@ -43,6 +43,9 @@ export interface Video { state?: VideoConstant scheduledUpdate?: VideoScheduleUpdate + blacklisted?: boolean + blacklistedReason?: string + account: { id: number uuid: string -- cgit v1.2.3