fix status number
This commit is contained in:
@@ -21,7 +21,6 @@ import {
|
||||
} from '@repo/ui/components/ui/form'
|
||||
import { Input } from '@repo/ui/components/ui/input'
|
||||
import { Label } from '@repo/ui/components/ui/label'
|
||||
import { FOUND, INTERNAL_SERVER_ERROR, OK } from './authorize'
|
||||
|
||||
const schema = z.object({
|
||||
username: z
|
||||
@@ -60,7 +59,7 @@ export async function action({ request, context }: Route.ActionArgs) {
|
||||
body: JSON.stringify(formData)
|
||||
})
|
||||
|
||||
if (r.status !== OK) {
|
||||
if (r.status === 200) {
|
||||
return Response.json(await r.json(), {
|
||||
status: r.status,
|
||||
headers: r.headers
|
||||
@@ -74,7 +73,7 @@ export async function action({ request, context }: Route.ActionArgs) {
|
||||
headers.set('Location', url.toString())
|
||||
|
||||
return new Response(await r.text(), {
|
||||
status: FOUND,
|
||||
status: 302,
|
||||
headers
|
||||
})
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user