fix status number

This commit is contained in:
2025-11-26 15:19:29 -03:00
parent d3ccfb4775
commit e81817693e

View File

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