diff --git a/src/services/signalRService.js b/src/services/signalRService.js index 79badd4f..a6072aa3 100644 --- a/src/services/signalRService.js +++ b/src/services/signalRService.js @@ -3,7 +3,8 @@ import { clearCacheKey, getCachedData } from "../slices/apiDataManager"; import showToast from "./toastService"; import eventBus from "./eventBus"; import { useSelector } from "react-redux"; - +// const base_Url = process.env.VITE_BASE_URL; +const base_Url = "https://devapi.marcoaiot.com"; let connection = null; const targetPath = ""; @@ -11,7 +12,7 @@ const targetPath = ""; export function startSignalR(loggedUser) { console.log(loggedUser?.employeeInfo.id); connection = new signalR.HubConnectionBuilder() - .withUrl("http://localhost:5032/hubs/marco", { + .withUrl(`${base_Url}/hubs/marco`, { accessTokenFactory: () => localStorage.getItem("jwtToken"), withCredentials: false, })