diff options
author | Chocobozzz <me@florianbigard.com> | 2020-08-06 14:58:01 +0200 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2020-08-07 08:28:14 +0200 |
commit | bd45d503e5d007e730f4e81dccd7e7864c9a85cc (patch) | |
tree | b78df768b8253ba401232c17da940cea016c9960 /shared/models/moderation | |
parent | 583eb04b541175035d6d452ca626a96ebf2b7437 (diff) | |
download | PeerTube-bd45d503e5d007e730f4e81dccd7e7864c9a85cc.tar.gz PeerTube-bd45d503e5d007e730f4e81dccd7e7864c9a85cc.tar.zst PeerTube-bd45d503e5d007e730f4e81dccd7e7864c9a85cc.zip |
Reorganize shared models
Diffstat (limited to 'shared/models/moderation')
-rw-r--r-- | shared/models/moderation/abuse/abuse-reason.model.ts | 15 | ||||
-rw-r--r-- | shared/models/moderation/abuse/abuse-state.model.ts | 2 |
2 files changed, 2 insertions, 15 deletions
diff --git a/shared/models/moderation/abuse/abuse-reason.model.ts b/shared/models/moderation/abuse/abuse-reason.model.ts index 36875969d..57359aef6 100644 --- a/shared/models/moderation/abuse/abuse-reason.model.ts +++ b/shared/models/moderation/abuse/abuse-reason.model.ts | |||
@@ -1,4 +1,4 @@ | |||
1 | export enum AbusePredefinedReasons { | 1 | export const enum AbusePredefinedReasons { |
2 | VIOLENT_OR_REPULSIVE = 1, | 2 | VIOLENT_OR_REPULSIVE = 1, |
3 | HATEFUL_OR_ABUSIVE, | 3 | HATEFUL_OR_ABUSIVE, |
4 | SPAM_OR_MISLEADING, | 4 | SPAM_OR_MISLEADING, |
@@ -18,16 +18,3 @@ export type AbusePredefinedReasonsString = | |||
18 | 'serverRules' | | 18 | 'serverRules' | |
19 | 'thumbnails' | | 19 | 'thumbnails' | |
20 | 'captions' | 20 | 'captions' |
21 | |||
22 | export const abusePredefinedReasonsMap: { | ||
23 | [key in AbusePredefinedReasonsString]: AbusePredefinedReasons | ||
24 | } = { | ||
25 | violentOrRepulsive: AbusePredefinedReasons.VIOLENT_OR_REPULSIVE, | ||
26 | hatefulOrAbusive: AbusePredefinedReasons.HATEFUL_OR_ABUSIVE, | ||
27 | spamOrMisleading: AbusePredefinedReasons.SPAM_OR_MISLEADING, | ||
28 | privacy: AbusePredefinedReasons.PRIVACY, | ||
29 | rights: AbusePredefinedReasons.RIGHTS, | ||
30 | serverRules: AbusePredefinedReasons.SERVER_RULES, | ||
31 | thumbnails: AbusePredefinedReasons.THUMBNAILS, | ||
32 | captions: AbusePredefinedReasons.CAPTIONS | ||
33 | } | ||
diff --git a/shared/models/moderation/abuse/abuse-state.model.ts b/shared/models/moderation/abuse/abuse-state.model.ts index b00cccad8..8ef6fdada 100644 --- a/shared/models/moderation/abuse/abuse-state.model.ts +++ b/shared/models/moderation/abuse/abuse-state.model.ts | |||
@@ -1,4 +1,4 @@ | |||
1 | export enum AbuseState { | 1 | export const enum AbuseState { |
2 | PENDING = 1, | 2 | PENDING = 1, |
3 | REJECTED = 2, | 3 | REJECTED = 2, |
4 | ACCEPTED = 3 | 4 | ACCEPTED = 3 |