added option to change backend base URL

This commit is contained in:
subnub
2024-12-22 19:58:33 -05:00
parent 634ef88d36
commit a08a2214a5
10 changed files with 57 additions and 25 deletions
+2 -2
View File
@@ -1,6 +1,7 @@
import { QueryFunctionContext } from "react-query";
import axios from "../axiosInterceptor";
import { getUserToken } from "./user";
import getBackendURL from "../utils/getBackendURL";
interface QueryKeyParams {
parent: string;
@@ -68,8 +69,7 @@ export const downloadZIPAPI = async (
) => {
await getUserToken();
// TODO: Change this
let url = `http://localhost:5173/api/folder-service/download-zip?`;
let url = `${getBackendURL()}/folder-service/download-zip?`;
for (const folderID of folderIDs) {
url += `folderIDs[]=${folderID}&`;