fix report api uuid param
All checks were successful
delpoy / build-and-deploy (push) Successful in 47s
All checks were successful
delpoy / build-and-deploy (push) Successful in 47s
This commit is contained in:
parent
b5e0dfad8c
commit
06751f0e27
@ -9,7 +9,7 @@ export const GET = (async ({ url }) => {
|
|||||||
if (env.REPORT_SECRET && url.searchParams.get('secret') !== env.REPORT_SECRET)
|
if (env.REPORT_SECRET && url.searchParams.get('secret') !== env.REPORT_SECRET)
|
||||||
return new Response(null, { status: 401 });
|
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 });
|
if (user === null) return new Response(null, { status: 400 });
|
||||||
|
|
||||||
const reports = {
|
const reports = {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user