9 lines
384 B
TypeScript
9 lines
384 B
TypeScript
import { NextResponse } from "next/server";
|
|
import { backendFetch } from "../../../../server/backend";
|
|
|
|
export async function POST(req: Request) {
|
|
const body = await req.text();
|
|
const upstream = await backendFetch("/v1/auth/reset", { method: "POST", body });
|
|
const data = await upstream.json().catch(() => ({}));
|
|
return NextResponse.json(data, { status: upstream.status });
|
|
}
|