rename cracked to noauth and remove the possibility to self register as such

This commit is contained in:
2023-11-13 11:42:24 +01:00
parent 241d6c031e
commit 4a4135c31e
9 changed files with 17 additions and 30 deletions

View File

@ -13,7 +13,9 @@ export const POST = (async ({ request, url }) => {
if (data.reporter == null || data.reason == null) return new Response(null, { status: 400 });
const reporter = await User.findOne({ where: { uuid: data.reporter } });
const reported = data.reported ? await User.findOne({ where: { uuid: data.reported } }) : undefined;
const reported = data.reported
? await User.findOne({ where: { uuid: data.reported } })
: undefined;
if (reporter == null || reported === null) return new Response(null, { status: 400 });