Hotfixes for Prod Build #2
1 changed files with 8 additions and 2 deletions
Use request body
commit
4e38397bfd
|
|
@ -1,6 +1,9 @@
|
||||||
const BACKEND_URL = process.env.BACKEND_URL;
|
const BACKEND_URL = process.env.BACKEND_URL;
|
||||||
|
|
||||||
export async function GET({ params }: { params: Promise<{ id: string }> }) {
|
export async function GET(
|
||||||
|
_request: Request,
|
||||||
|
{ params }: { params: Promise<{ id: string }> },
|
||||||
|
) {
|
||||||
const { id } = await params;
|
const { id } = await params;
|
||||||
const response = await fetch(`${BACKEND_URL}/services/${id}`);
|
const response = await fetch(`${BACKEND_URL}/services/${id}`);
|
||||||
|
|
||||||
|
|
@ -15,7 +18,10 @@ export async function GET({ params }: { params: Promise<{ id: string }> }) {
|
||||||
return Response.json(data);
|
return Response.json(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function DELETE({ params }: { params: Promise<{ id: string }> }) {
|
export async function DELETE(
|
||||||
|
_request: Request,
|
||||||
|
{ params }: { params: Promise<{ id: string }> },
|
||||||
|
) {
|
||||||
const { id } = await params;
|
const { id } = await params;
|
||||||
const response = await fetch(`${BACKEND_URL}/services/${id}`, {
|
const response = await fetch(`${BACKEND_URL}/services/${id}`, {
|
||||||
method: "DELETE",
|
method: "DELETE",
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue