aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-08-10 16:54:01 +0200
committerChocobozzz <me@florianbigard.com>2018-08-10 16:54:01 +0200
commit268eebed921ac13a9ce0f4717f4923aa24190657 (patch)
tree52f8436968c8dcc686663ef5db8dffd7ed191d34 /shared
parent904a463c7792837f0a468a522a28448323e48593 (diff)
downloadPeerTube-268eebed921ac13a9ce0f4717f4923aa24190657.tar.gz
PeerTube-268eebed921ac13a9ce0f4717f4923aa24190657.tar.zst
PeerTube-268eebed921ac13a9ce0f4717f4923aa24190657.zip
Add state and moderationComment for abuses on server side
Diffstat (limited to 'shared')
-rw-r--r--shared/models/videos/index.ts1
-rw-r--r--shared/models/videos/video-abuse-state.model.ts5
-rw-r--r--shared/models/videos/video-abuse-update.model.ts6
-rw-r--r--shared/models/videos/video-abuse.model.ts7
4 files changed, 19 insertions, 0 deletions
diff --git a/shared/models/videos/index.ts b/shared/models/videos/index.ts
index 17cf8be24..2d7de2a0d 100644
--- a/shared/models/videos/index.ts
+++ b/shared/models/videos/index.ts
@@ -1,6 +1,7 @@
1export * from './user-video-rate-update.model' 1export * from './user-video-rate-update.model'
2export * from './user-video-rate.model' 2export * from './user-video-rate.model'
3export * from './user-video-rate.type' 3export * from './user-video-rate.type'
4export * from './video-abuse-state.model'
4export * from './video-abuse-create.model' 5export * from './video-abuse-create.model'
5export * from './video-abuse.model' 6export * from './video-abuse.model'
6export * from './video-blacklist.model' 7export * from './video-blacklist.model'
diff --git a/shared/models/videos/video-abuse-state.model.ts b/shared/models/videos/video-abuse-state.model.ts
new file mode 100644
index 000000000..529f034bd
--- /dev/null
+++ b/shared/models/videos/video-abuse-state.model.ts
@@ -0,0 +1,5 @@
1export enum VideoAbuseState {
2 PENDING = 1,
3 REJECTED = 2,
4 ACCEPTED = 3
5}
diff --git a/shared/models/videos/video-abuse-update.model.ts b/shared/models/videos/video-abuse-update.model.ts
new file mode 100644
index 000000000..9b32aae48
--- /dev/null
+++ b/shared/models/videos/video-abuse-update.model.ts
@@ -0,0 +1,6 @@
1import { VideoAbuseState } from './video-abuse-state.model'
2
3export interface VideoAbuseUpdate {
4 moderationComment?: string
5 state?: VideoAbuseState
6}
diff --git a/shared/models/videos/video-abuse.model.ts b/shared/models/videos/video-abuse.model.ts
index 51070a7a3..1fecce037 100644
--- a/shared/models/videos/video-abuse.model.ts
+++ b/shared/models/videos/video-abuse.model.ts
@@ -1,14 +1,21 @@
1import { Account } from '../actors' 1import { Account } from '../actors'
2import { VideoConstant } from './video-constant.model'
3import { VideoAbuseState } from './video-abuse-state.model'
2 4
3export interface VideoAbuse { 5export interface VideoAbuse {
4 id: number 6 id: number
5 reason: string 7 reason: string
6 reporterAccount: Account 8 reporterAccount: Account
9
10 state: VideoConstant<VideoAbuseState>
11 moderationComment?: string
12
7 video: { 13 video: {
8 id: number 14 id: number
9 name: string 15 name: string
10 uuid: string 16 uuid: string
11 url: string 17 url: string
12 } 18 }
19
13 createdAt: Date 20 createdAt: Date
14} 21}