mirror of
https://github.com/misskey-dev/misskey.git
synced 2024-12-27 22:39:33 +09:00
spec(backend): 管理者を通報できるように (MisskeyIO#450)
This commit is contained in:
parent
915ab3c695
commit
3fc9252641
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user