add report admin panel
All checks were successful
delpoy / build-and-deploy (push) Successful in 53s
All checks were successful
delpoy / build-and-deploy (push) Successful in 53s
This commit is contained in:
@ -17,14 +17,15 @@ export const POST = (async ({ request, url }) => {
|
||||
subject: data.reason,
|
||||
body: null,
|
||||
draft: true,
|
||||
url_id: crypto.randomBytes(18).toString('hex'),
|
||||
status: 'none',
|
||||
url_hash: crypto.randomBytes(18).toString('hex'),
|
||||
completed: false,
|
||||
reporter_user_id: reporter.id,
|
||||
reported_user_id: reported.id
|
||||
reporter_id: reporter.id,
|
||||
reported_id: reported.id
|
||||
});
|
||||
|
||||
return new Response(
|
||||
JSON.stringify({ url: `${url.toString().replace(/\/$/, '')}/${report.url_id}` }),
|
||||
JSON.stringify({ url: `${url.toString().replace(/\/$/, '')}/${report.url_hash}` }),
|
||||
{
|
||||
status: 201
|
||||
}
|
||||
|
Reference in New Issue
Block a user