refactor: use apiUrl
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user