first commit
This commit is contained in:
parent
b216a187bd
commit
f73c77f548
119 changed files with 4504 additions and 4829 deletions
17
frontend/app/api/projects/route.ts
Normal file
17
frontend/app/api/projects/route.ts
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
import { NextResponse } from "next/server";
|
||||
|
||||
export async function POST(req: Request) {
|
||||
const body = await req.json();
|
||||
|
||||
const res = await fetch("http://127.0.0.1:5000/api/projects/", {
|
||||
method: "POST",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
"x-api-key": process.env.API_KEY!,
|
||||
},
|
||||
body: JSON.stringify(body),
|
||||
});
|
||||
|
||||
const data = await res.json();
|
||||
return NextResponse.json(data, { status: res.status });
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue