spec(backend): 管理者を通報できるように (MisskeyIO#450)

This commit is contained in:
Mizukusa 2024-02-13 23:27:58 +09:00 committed by GitHub
parent 915ab3c695
commit 3fc9252641
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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<typeof meta, typeof paramDef> { // 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,