refactor: use apiUrl

This commit is contained in:
karishmas6
2024-11-01 08:25:14 +05:30
parent bb38786027
commit ba9e046576
6 changed files with 36 additions and 30 deletions

View File

@@ -1,8 +1,9 @@
import { default as axios } from "axios";
import { apiUrl } from "../apiConfig";
export const handleUploadCredentials = async (fileName: string, credentials: any, spreadsheetId: string, range: string): Promise<boolean> => {
try {
const response = await axios.post('http://localhost:8080/integration/upload-credentials', { fileName, credentials: JSON.parse(credentials), spreadsheetId, range });
const response = await axios.post(`${apiUrl}/integration/upload-credentials`, { fileName, credentials: JSON.parse(credentials), spreadsheetId, range });
if (response.status === 200) {
return response.data;
} else {