fix
This commit is contained in:
@@ -63,21 +63,21 @@ export async function action({ request, context }: Route.ActionArgs) {
|
|||||||
})
|
})
|
||||||
|
|
||||||
if (r.status === 200) {
|
if (r.status === 200) {
|
||||||
return Response.json(null, {
|
const url = new URL(request.url)
|
||||||
status: r.status,
|
url.pathname = '/authorize'
|
||||||
headers: r.headers
|
|
||||||
|
const headers = new Headers(r.headers)
|
||||||
|
headers.set('Location', url.toString())
|
||||||
|
|
||||||
|
return new Response(await r.text(), {
|
||||||
|
status: 302,
|
||||||
|
headers
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const url = new URL(request.url)
|
return Response.json(await r.json(), {
|
||||||
url.pathname = '/authorize'
|
status: r.status,
|
||||||
|
headers: r.headers
|
||||||
const headers = new Headers(r.headers)
|
|
||||||
headers.set('Location', url.toString())
|
|
||||||
|
|
||||||
return new Response(await r.text(), {
|
|
||||||
status: 402,
|
|
||||||
headers
|
|
||||||
})
|
})
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error)
|
console.error(error)
|
||||||
|
|||||||
Reference in New Issue
Block a user