From 3fc9252641971c3d431515c3740ea004d8734103 Mon Sep 17 00:00:00 2001 From: Mizukusa <126334519+Muzukusa@users.noreply.github.com> Date: Tue, 13 Feb 2024 23:27:58 +0900 Subject: [PATCH] =?UTF-8?q?spec(backend):=20=E7=AE=A1=E7=90=86=E8=80=85?= =?UTF-8?q?=E3=82=92=E9=80=9A=E5=A0=B1=E3=81=A7=E3=81=8D=E3=82=8B=E3=82=88?= =?UTF-8?q?=E3=81=86=E3=81=AB=20(MisskeyIO#450)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/server/api/endpoints/users/report-abuse.ts | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/packages/backend/src/server/api/endpoints/users/report-abuse.ts b/packages/backend/src/server/api/endpoints/users/report-abuse.ts index 9ce78f725f..a1130541da 100644 --- a/packages/backend/src/server/api/endpoints/users/report-abuse.ts +++ b/packages/backend/src/server/api/endpoints/users/report-abuse.ts @@ -34,12 +34,6 @@ export const meta = { code: 'CANNOT_REPORT_YOURSELF', id: '1e13149e-b1e8-43cf-902e-c01dbfcb202f', }, - - cannotReportAdmin: { - message: 'Cannot report the admin.', - code: 'CANNOT_REPORT_THE_ADMIN', - id: '35e166f5-05fb-4f87-a2d5-adb42676d48f', - }, }, } as const; @@ -91,10 +85,6 @@ export default class extends Endpoint { // eslint- throw new ApiError(meta.errors.cannotReportYourself); } - if (await this.roleService.isAdministrator(user)) { - throw new ApiError(meta.errors.cannotReportAdmin); - } - const report = await this.abuseUserReportsRepository.insert({ id: this.idService.gen(), targetUserId: user.id,