fix
This commit is contained in:
@@ -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 })
|
||||
|
||||
Reference in New Issue
Block a user