update form

This commit is contained in:
2025-09-15 22:28:59 -03:00
parent 6f983fe0ac
commit 207231cff6
6 changed files with 314 additions and 83 deletions

View File

@@ -30,16 +30,23 @@ export async function loader({ request, context }: Route.LoaderArgs) {
redirect: 'manual'
})
if (r.status === httpStatus.BAD_REQUEST) {
return new Response(null, {
status: httpStatus.FOUND,
headers: {
Location: redirect.toString()
}
// if (r.status === httpStatus.BAD_REQUEST) {
// return new Response(null, {
// status: httpStatus.FOUND,
// headers: {
// Location: redirect.toString()
// }
// })
// }
if (r.status === httpStatus.FOUND) {
return new Response(await r.text(), {
status: r.status,
headers: r.headers
})
}
return new Response(await r.text(), {
return Response.json(await r.json(), {
status: r.status,
headers: r.headers
})