aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/types
diff options
context:
space:
mode:
Diffstat (limited to 'server/types')
-rw-r--r--server/types/models/moderation/abuse.ts9
1 files changed, 7 insertions, 2 deletions
diff --git a/server/types/models/moderation/abuse.ts b/server/types/models/moderation/abuse.ts
index abbc93d6f..8e12be874 100644
--- a/server/types/models/moderation/abuse.ts
+++ b/server/types/models/moderation/abuse.ts
@@ -3,7 +3,7 @@ import { VideoCommentAbuseModel } from '@server/models/abuse/video-comment-abuse
3import { PickWith } from '@shared/core-utils' 3import { PickWith } from '@shared/core-utils'
4import { AbuseModel } from '../../../models/abuse/abuse' 4import { AbuseModel } from '../../../models/abuse/abuse'
5import { MAccountDefault, MAccountFormattable, MAccountLight, MAccountUrl } from '../account' 5import { MAccountDefault, MAccountFormattable, MAccountLight, MAccountUrl } from '../account'
6import { MCommentOwner, MCommentUrl, MVideoUrl, MCommentOwnerVideo } from '../video' 6import { MCommentOwner, MCommentUrl, MVideoUrl, MCommentOwnerVideo, MComment, MCommentVideo } from '../video'
7import { MVideo, MVideoAccountLightBlacklistAllFiles } from '../video/video' 7import { MVideo, MVideoAccountLightBlacklistAllFiles } from '../video/video'
8 8
9type Use<K extends keyof AbuseModel, M> = PickWith<AbuseModel, K, M> 9type Use<K extends keyof AbuseModel, M> = PickWith<AbuseModel, K, M>
@@ -51,6 +51,10 @@ export type MCommentAbuseUrl =
51 MCommentAbuse & 51 MCommentAbuse &
52 UseCommentAbuse<'VideoComment', MCommentUrl> 52 UseCommentAbuse<'VideoComment', MCommentUrl>
53 53
54export type MCommentAbuseFormattable =
55 MCommentAbuse &
56 UseCommentAbuse<'VideoComment', MComment & PickWith<MCommentVideo, 'Video', Pick<MVideo, 'id' | 'uuid' | 'name'>>>
57
54// ############################################################################ 58// ############################################################################
55 59
56export type MAbuseId = Pick<AbuseModel, 'id'> 60export type MAbuseId = Pick<AbuseModel, 'id'>
@@ -94,4 +98,5 @@ export type MAbuseFull =
94export type MAbuseFormattable = 98export type MAbuseFormattable =
95 MAbuse & 99 MAbuse &
96 Use<'ReporterAccount', MAccountFormattable> & 100 Use<'ReporterAccount', MAccountFormattable> &
97 Use<'VideoAbuse', MVideoAbuseFormattable> 101 Use<'VideoAbuse', MVideoAbuseFormattable> &
102 Use<'VideoCommentAbuse', MCommentAbuseFormattable>