account settings and account creation

This commit is contained in:
2025-12-27 20:01:17 -05:00
parent aa2dfb0407
commit 2202abe89f
21 changed files with 1848 additions and 718 deletions
+25
View File
@@ -0,0 +1,25 @@
import { NextResponse } from "next/server";
const API_BASE_URL =
process.env.NEXT_PUBLIC_API_BASE_URL ?? "http://localhost:8080";
export async function POST(req: Request) {
const body = await req.text().catch(() => "");
const auth = req.headers.get("authorization") ?? "";
const upstream = await fetch(`${API_BASE_URL}/api/v1/users/me/password`, {
method: "POST",
headers: {
"content-type": req.headers.get("content-type") ?? "application/json",
...(auth ? { authorization: auth } : {}),
},
body,
cache: "no-store",
});
const text = await upstream.text().catch(() => "");
return new NextResponse(text, {
status: upstream.status,
headers: { "content-type": upstream.headers.get("content-type") ?? "application/json" },
});
}