forked from FoundKeyGang/FoundKey
fix: remove unnecessary null check
Because `findOneByOrFail` is used above, the null check is unnecessary.
This commit is contained in:
parent
d92d389cda
commit
fc51ac17b1
1 changed files with 0 additions and 4 deletions
|
@ -25,10 +25,6 @@ export const paramDef = {
|
|||
export default define(meta, paramDef, async (ps, me) => {
|
||||
const report = await AbuseUserReports.findOneByOrFail({ id: ps.reportId });
|
||||
|
||||
if (report == null) {
|
||||
throw new Error('report not found');
|
||||
}
|
||||
|
||||
if (ps.forward && report.targetUserHost != null) {
|
||||
const actor = await getInstanceActor();
|
||||
const targetUser = await Users.findOneByOrFail({ id: report.targetUserId });
|
||||
|
|
Loading…
Reference in a new issue