From 668b7f096ead74d6e7692944a026c936f581dae8 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 28 Jul 2020 11:12:16 +0200 Subject: Add openapi doc --- server/lib/notifier.ts | 3 +-- server/middlewares/validators/abuse.ts | 2 +- server/tests/api/check-params/abuses.ts | 1 - server/types/models/moderation/abuse.ts | 6 +++--- server/typings/express/index.d.ts | 5 ++--- 5 files changed, 7 insertions(+), 10 deletions(-) (limited to 'server') 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 @@ -import { AbuseMessageModel } from '@server/models/abuse/abuse-message' +import { AccountModel } from '@server/models/account/account' import { getServerActor } from '@server/models/application/application' import { ServerBlocklistModel } from '@server/models/server/server-blocklist' import { @@ -24,7 +24,6 @@ import { MCommentOwnerVideo, MVideoAccountLight, MVideoFullLight } from '../type import { isBlockedByServerOrAccount } from './blocklist' import { Emailer } from './emailer' import { PeerTubeSocket } from './peertube-socket' -import { AccountModel } from '@server/models/account/account' class Notifier { 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 = [ const abuse = res.locals.abuse if (abuse.ReporterAccount.isOwned() === false) { return res.status(400).json({ - error: 'This abuse was created by a user of your instance.', + error: 'This abuse was created by a user of your instance.' }) } 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 () { await cleanupTests([ server ]) }) }) - 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 @@ import { VideoAbuseModel } from '@server/models/abuse/video-abuse' import { VideoCommentAbuseModel } from '@server/models/abuse/video-comment-abuse' +import { VideoCommentModel } from '@server/models/video/video-comment' import { PickWith } from '@shared/core-utils' import { AbuseModel } from '../../../models/abuse/abuse' -import { MAccountDefault, MAccountFormattable, MAccountLight, MAccountUrl, MAccount } from '../account' -import { MCommentOwner, MCommentUrl, MVideoUrl, MCommentOwnerVideo, MComment, MCommentVideo } from '../video' +import { MAccountDefault, MAccountFormattable, MAccountLight, MAccountUrl } from '../account' +import { MComment, MCommentOwner, MCommentUrl, MCommentVideo, MVideoUrl } from '../video' import { MVideo, MVideoAccountLightBlacklistAllFiles } from '../video/video' -import { VideoCommentModel } from '@server/models/video/video-comment' type Use = PickWith type UseVideoAbuse = PickWith 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 @@ import { RegisterServerAuthExternalOptions } from '@server/types' import { - MAbuse, MAbuseMessage, + MAbuseReporter, MAccountBlocklist, MActorUrl, MStreamingPlaylist, @@ -9,8 +9,7 @@ import { MVideoFile, MVideoImmutable, MVideoPlaylistFull, - MVideoPlaylistFullSummary, - MAbuseReporter + MVideoPlaylistFullSummary } from '@server/types/models' import { MOAuthTokenUser } from '@server/types/models/oauth/oauth-token' import { MPlugin, MServer, MServerBlocklist } from '@server/types/models/server' -- cgit v1.2.3