fix(network): restore conditional base URL for development environment

- Reintroduced conditional logic for the base URL to switch between local and production endpoints based on the environment.
This commit is contained in:
2025-04-14 11:41:29 +02:00
parent 10bc0a04a2
commit 67468bddb6

View File

@ -19,11 +19,9 @@ type BaseRequestParams = Partial<{
method: "GET" | "POST";
}>;
// export const base = import.meta.env.DEV
// ? "http://localhost:3040"
// : "https://haystack.johncosta.tech";
export const base = "https://haystack.johncosta.tech";
export const base = import.meta.env.DEV
? "http://localhost:3040"
: "https://haystack.johncosta.tech";
const getBaseRequest = ({ path, body, method }: BaseRequestParams): Request => {
return new Request(`${base}/${path}`, {