return 404 on user api if uuid does not exist
All checks were successful
delpoy / build-and-deploy (push) Successful in 1m31s

This commit is contained in:
bytedream 2023-12-23 23:04:57 +01:00
parent fe6fadee39
commit 8910a98489

View File

@ -11,7 +11,7 @@ export const GET = (async ({ url }) => {
if (uuid == null) return new Response(null, { status: 400 });
const user = await User.findOne({ where: { uuid: uuid } });
if (user == null) return new Response(null, { status: 400 });
if (user == null) return new Response(null, { status: 404 });
const query = (await Report.findOne({
where: { reported_id: user.id },