16 lines
363 B
TypeScript
16 lines
363 B
TypeScript
const BACKEND_URL = process.env.BACKEND_URL;
|
|
|
|
export async function POST(request: Request) {
|
|
const response = await fetch(`${BACKEND_URL}/users/auth`, {
|
|
method: "POST",
|
|
headers: request.headers,
|
|
body: request.body,
|
|
duplex: "half",
|
|
});
|
|
|
|
const data = await response.json();
|
|
|
|
return Response.json(data, {
|
|
status: response.status,
|
|
});
|
|
}
|