Skip to content

Commit

Permalink
feat: add window.location backend url support
Browse files Browse the repository at this point in the history
  • Loading branch information
martinstark committed Apr 30, 2024
1 parent 543a556 commit f26d160
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/api/api.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { handleFetchRequest } from "./handle-fetch-request.ts";

const API_URL = import.meta.env.VITE_BACKEND_URL ?? "";
const API_URL =
import.meta.env.VITE_BACKEND_URL ?? `${window.location.origin}/api/v1/`;

type TCreateProductionOptions = {
name: string;
Expand Down

0 comments on commit f26d160

Please sign in to comment.