fix report api uuid param
All checks were successful
delpoy / build-and-deploy (push) Successful in 47s

This commit is contained in:
bytedream 2024-12-01 14:46:23 +01:00
parent b5e0dfad8c
commit 06751f0e27

View File

@ -9,7 +9,7 @@ export const GET = (async ({ url }) => {
if (env.REPORT_SECRET && url.searchParams.get('secret') !== env.REPORT_SECRET)
return new Response(null, { status: 401 });
const user = await User.findOne({ where: { uuid: url.searchParams.get('user') ?? '' } });
const user = await User.findOne({ where: { uuid: url.searchParams.get('uuid') ?? '' } });
if (user === null) return new Response(null, { status: 400 });
const reports = {