aboutsummaryrefslogtreecommitdiffhomepage
path: root/server
diff options
context:
space:
mode:
Diffstat (limited to 'server')
-rw-r--r--server/lib/notifier.ts3
-rw-r--r--server/middlewares/validators/abuse.ts2
-rw-r--r--server/tests/api/check-params/abuses.ts1
-rw-r--r--server/types/models/moderation/abuse.ts6
-rw-r--r--server/typings/express/index.d.ts5
5 files changed, 7 insertions, 10 deletions
diff --git a/server/lib/notifier.ts b/server/lib/notifier.ts
index 9c2f16c27..1da81a535 100644
--- a/server/lib/notifier.ts
+++ b/server/lib/notifier.ts
@@ -1,4 +1,4 @@
1import { AbuseMessageModel } from '@server/models/abuse/abuse-message' 1import { AccountModel } from '@server/models/account/account'
2import { getServerActor } from '@server/models/application/application' 2import { getServerActor } from '@server/models/application/application'
3import { ServerBlocklistModel } from '@server/models/server/server-blocklist' 3import { ServerBlocklistModel } from '@server/models/server/server-blocklist'
4import { 4import {
@@ -24,7 +24,6 @@ import { MCommentOwnerVideo, MVideoAccountLight, MVideoFullLight } from '../type
24import { isBlockedByServerOrAccount } from './blocklist' 24import { isBlockedByServerOrAccount } from './blocklist'
25import { Emailer } from './emailer' 25import { Emailer } from './emailer'
26import { PeerTubeSocket } from './peertube-socket' 26import { PeerTubeSocket } from './peertube-socket'
27import { AccountModel } from '@server/models/account/account'
28 27
29class Notifier { 28class Notifier {
30 29
diff --git a/server/middlewares/validators/abuse.ts b/server/middlewares/validators/abuse.ts
index 2a096e0af..f99d850a5 100644
--- a/server/middlewares/validators/abuse.ts
+++ b/server/middlewares/validators/abuse.ts
@@ -208,7 +208,7 @@ const checkAbuseValidForMessagesValidator = [
208 const abuse = res.locals.abuse 208 const abuse = res.locals.abuse
209 if (abuse.ReporterAccount.isOwned() === false) { 209 if (abuse.ReporterAccount.isOwned() === false) {
210 return res.status(400).json({ 210 return res.status(400).json({
211 error: 'This abuse was created by a user of your instance.', 211 error: 'This abuse was created by a user of your instance.'
212 }) 212 })
213 } 213 }
214 214
diff --git a/server/tests/api/check-params/abuses.ts b/server/tests/api/check-params/abuses.ts
index 0ef8f6cac..1f040bbcf 100644
--- a/server/tests/api/check-params/abuses.ts
+++ b/server/tests/api/check-params/abuses.ts
@@ -427,4 +427,3 @@ describe('Test abuses API validators', function () {
427 await cleanupTests([ server ]) 427 await cleanupTests([ server ])
428 }) 428 })
429}) 429})
430
diff --git a/server/types/models/moderation/abuse.ts b/server/types/models/moderation/abuse.ts
index 5409dfd6b..6fd83684c 100644
--- a/server/types/models/moderation/abuse.ts
+++ b/server/types/models/moderation/abuse.ts
@@ -1,11 +1,11 @@
1import { VideoAbuseModel } from '@server/models/abuse/video-abuse' 1import { VideoAbuseModel } from '@server/models/abuse/video-abuse'
2import { VideoCommentAbuseModel } from '@server/models/abuse/video-comment-abuse' 2import { VideoCommentAbuseModel } from '@server/models/abuse/video-comment-abuse'
3import { VideoCommentModel } from '@server/models/video/video-comment'
3import { PickWith } from '@shared/core-utils' 4import { PickWith } from '@shared/core-utils'
4import { AbuseModel } from '../../../models/abuse/abuse' 5import { AbuseModel } from '../../../models/abuse/abuse'
5import { MAccountDefault, MAccountFormattable, MAccountLight, MAccountUrl, MAccount } from '../account' 6import { MAccountDefault, MAccountFormattable, MAccountLight, MAccountUrl } from '../account'
6import { MCommentOwner, MCommentUrl, MVideoUrl, MCommentOwnerVideo, MComment, MCommentVideo } from '../video' 7import { MComment, MCommentOwner, MCommentUrl, MCommentVideo, MVideoUrl } from '../video'
7import { MVideo, MVideoAccountLightBlacklistAllFiles } from '../video/video' 8import { MVideo, MVideoAccountLightBlacklistAllFiles } from '../video/video'
8import { VideoCommentModel } from '@server/models/video/video-comment'
9 9
10type Use<K extends keyof AbuseModel, M> = PickWith<AbuseModel, K, M> 10type Use<K extends keyof AbuseModel, M> = PickWith<AbuseModel, K, M>
11type UseVideoAbuse<K extends keyof VideoAbuseModel, M> = PickWith<VideoAbuseModel, K, M> 11type UseVideoAbuse<K extends keyof VideoAbuseModel, M> = PickWith<VideoAbuseModel, K, M>
diff --git a/server/typings/express/index.d.ts b/server/typings/express/index.d.ts
index d95b8925d..cd8e544e0 100644
--- a/server/typings/express/index.d.ts
+++ b/server/typings/express/index.d.ts
@@ -1,7 +1,7 @@
1import { RegisterServerAuthExternalOptions } from '@server/types' 1import { RegisterServerAuthExternalOptions } from '@server/types'
2import { 2import {
3 MAbuse,
4 MAbuseMessage, 3 MAbuseMessage,
4 MAbuseReporter,
5 MAccountBlocklist, 5 MAccountBlocklist,
6 MActorUrl, 6 MActorUrl,
7 MStreamingPlaylist, 7 MStreamingPlaylist,
@@ -9,8 +9,7 @@ import {
9 MVideoFile, 9 MVideoFile,
10 MVideoImmutable, 10 MVideoImmutable,
11 MVideoPlaylistFull, 11 MVideoPlaylistFull,
12 MVideoPlaylistFullSummary, 12 MVideoPlaylistFullSummary
13 MAbuseReporter
14} from '@server/types/models' 13} from '@server/types/models'
15import { MOAuthTokenUser } from '@server/types/models/oauth/oauth-token' 14import { MOAuthTokenUser } from '@server/types/models/oauth/oauth-token'
16import { MPlugin, MServer, MServerBlocklist } from '@server/types/models/server' 15import { MPlugin, MServer, MServerBlocklist } from '@server/types/models/server'