From 9e071674b2a85ca914c47208b912797bd9307a76 Mon Sep 17 00:00:00 2001 From: "cyril.tsui" Date: Thu, 25 Apr 2024 20:38:38 +0800 Subject: [PATCH] URL --- src/components/CreateInvoice/CreateInvoice.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/CreateInvoice/CreateInvoice.tsx b/src/components/CreateInvoice/CreateInvoice.tsx index aa400e5..676a708 100644 --- a/src/components/CreateInvoice/CreateInvoice.tsx +++ b/src/components/CreateInvoice/CreateInvoice.tsx @@ -24,6 +24,7 @@ import ProjectTotalFee from "./ProjectTotalFee"; import { timestampToDateString } from "@/app/utils/formatUtil"; import dayjs from "dayjs"; import { getSession } from "next-auth/react" +import { BASE_API_URL } from "@/config/api"; const CreateInvoice: React.FC = ({ }) => { @@ -117,7 +118,7 @@ const CreateInvoice: React.FC = ({ try { // Make an API request to generate the JasperReport - const response = await fetch(`http://localhost:8090/api/invoices/pdf`, { + const response = await fetch(`${BASE_API_URL}/invoices/pdf`, { method: 'POST', headers: { 'Content-Type': 'application/json',