This commit is contained in:
2025-11-28 16:31:54 -03:00
parent 441640e8fd
commit a74334b69c

View File

@@ -63,12 +63,6 @@ export async function action({ request, context }: Route.ActionArgs) {
})
if (r.status === 200) {
return Response.json(null, {
status: r.status,
headers: r.headers
})
}
const url = new URL(request.url)
url.pathname = '/authorize'
@@ -76,9 +70,15 @@ export async function action({ request, context }: Route.ActionArgs) {
headers.set('Location', url.toString())
return new Response(await r.text(), {
status: 402,
status: 302,
headers
})
}
return Response.json(await r.json(), {
status: r.status,
headers: r.headers
})
} catch (error) {
console.error(error)
return Response.json({}, { status: 500 })