Add user login, signup, and session.
This commit is contained in:
parent
3be05a9752
commit
f5466faa70
6 changed files with 101 additions and 36 deletions
11
app/api/users/login/route.ts
Normal file
11
app/api/users/login/route.ts
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
const BACKEND_URL = process.env.BACKEND_URL;
|
||||
|
||||
export async function POST(request: Request) {
|
||||
const response = await fetch(`${BACKEND_URL}/users/token`, request);
|
||||
|
||||
const data = await response.json();
|
||||
|
||||
return Response.json(data, {
|
||||
status: response.status,
|
||||
});
|
||||
}
|
||||
Loading…
Reference in a new issue