aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/models/moderation
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-07-07 10:57:04 +0200
committerChocobozzz <chocobozzz@cpy.re>2020-07-10 14:02:41 +0200
commit57f6896f67cfc570cf3605dd94b0778101b2d9b9 (patch)
treeb82d879c46868ce75ff76c3e4d4eed590a87f6c4 /shared/models/moderation
parentd95d15598847c7f020aa056e7e6e0c02d2bbf732 (diff)
downloadPeerTube-57f6896f67cfc570cf3605dd94b0778101b2d9b9.tar.gz
PeerTube-57f6896f67cfc570cf3605dd94b0778101b2d9b9.tar.zst
PeerTube-57f6896f67cfc570cf3605dd94b0778101b2d9b9.zip
Implement abuses check params
Diffstat (limited to 'shared/models/moderation')
-rw-r--r--shared/models/moderation/abuse/abuse-create.model.ts7
-rw-r--r--shared/models/moderation/abuse/abuse-filter.ts1
-rw-r--r--shared/models/moderation/abuse/abuse-filter.type.ts1
-rw-r--r--shared/models/moderation/abuse/abuse.model.ts10
-rw-r--r--shared/models/moderation/abuse/index.ts1
5 files changed, 16 insertions, 4 deletions
diff --git a/shared/models/moderation/abuse/abuse-create.model.ts b/shared/models/moderation/abuse/abuse-create.model.ts
index c0d04e46d..b0358dbb9 100644
--- a/shared/models/moderation/abuse/abuse-create.model.ts
+++ b/shared/models/moderation/abuse/abuse-create.model.ts
@@ -1,11 +1,14 @@
1import { AbusePredefinedReasonsString } from './abuse-reason.model' 1import { AbusePredefinedReasonsString } from './abuse-reason.model'
2 2
3export interface AbuseCreate { 3export interface AbuseCreate {
4 accountId: number
5
6 reason: string 4 reason: string
5
7 predefinedReasons?: AbusePredefinedReasonsString[] 6 predefinedReasons?: AbusePredefinedReasonsString[]
8 7
8 account?: {
9 id: number
10 }
11
9 video?: { 12 video?: {
10 id: number 13 id: number
11 startAt?: number 14 startAt?: number
diff --git a/shared/models/moderation/abuse/abuse-filter.ts b/shared/models/moderation/abuse/abuse-filter.ts
deleted file mode 100644
index 03303bbab..000000000
--- a/shared/models/moderation/abuse/abuse-filter.ts
+++ /dev/null
@@ -1 +0,0 @@
1export type AbuseFilter = 'video' | 'comment'
diff --git a/shared/models/moderation/abuse/abuse-filter.type.ts b/shared/models/moderation/abuse/abuse-filter.type.ts
new file mode 100644
index 000000000..7dafc6d77
--- /dev/null
+++ b/shared/models/moderation/abuse/abuse-filter.type.ts
@@ -0,0 +1 @@
export type AbuseFilter = 'video' | 'comment' | 'account'
diff --git a/shared/models/moderation/abuse/abuse.model.ts b/shared/models/moderation/abuse/abuse.model.ts
index 9ff150c4a..a120803e6 100644
--- a/shared/models/moderation/abuse/abuse.model.ts
+++ b/shared/models/moderation/abuse/abuse.model.ts
@@ -9,6 +9,7 @@ export interface VideoAbuse {
9 name: string 9 name: string
10 uuid: string 10 uuid: string
11 nsfw: boolean 11 nsfw: boolean
12
12 deleted: boolean 13 deleted: boolean
13 blacklisted: boolean 14 blacklisted: boolean
14 15
@@ -21,8 +22,15 @@ export interface VideoAbuse {
21 22
22export interface VideoCommentAbuse { 23export interface VideoCommentAbuse {
23 id: number 24 id: number
24 account?: Account 25
26 video: {
27 id: number
28 name: string
29 uuid: string
30 }
31
25 text: string 32 text: string
33
26 deleted: boolean 34 deleted: boolean
27} 35}
28 36
diff --git a/shared/models/moderation/abuse/index.ts b/shared/models/moderation/abuse/index.ts
index 32a6b4e6c..55046426a 100644
--- a/shared/models/moderation/abuse/index.ts
+++ b/shared/models/moderation/abuse/index.ts
@@ -1,4 +1,5 @@
1export * from './abuse-create.model' 1export * from './abuse-create.model'
2export * from './abuse-filter.type'
2export * from './abuse-reason.model' 3export * from './abuse-reason.model'
3export * from './abuse-state.model' 4export * from './abuse-state.model'
4export * from './abuse-update.model' 5export * from './abuse-update.model'