Added base url in signalrServies
This commit is contained in:
parent
053dfaf197
commit
732a6901ee
@ -3,7 +3,8 @@ import { clearCacheKey, getCachedData } from "../slices/apiDataManager";
|
|||||||
import showToast from "./toastService";
|
import showToast from "./toastService";
|
||||||
import eventBus from "./eventBus";
|
import eventBus from "./eventBus";
|
||||||
import { useSelector } from "react-redux";
|
import { useSelector } from "react-redux";
|
||||||
|
// const base_Url = process.env.VITE_BASE_URL;
|
||||||
|
const base_Url = "https://devapi.marcoaiot.com";
|
||||||
let connection = null;
|
let connection = null;
|
||||||
|
|
||||||
const targetPath = "";
|
const targetPath = "";
|
||||||
@ -11,7 +12,7 @@ const targetPath = "";
|
|||||||
export function startSignalR(loggedUser) {
|
export function startSignalR(loggedUser) {
|
||||||
console.log(loggedUser?.employeeInfo.id);
|
console.log(loggedUser?.employeeInfo.id);
|
||||||
connection = new signalR.HubConnectionBuilder()
|
connection = new signalR.HubConnectionBuilder()
|
||||||
.withUrl("http://localhost:5032/hubs/marco", {
|
.withUrl(`${base_Url}/hubs/marco`, {
|
||||||
accessTokenFactory: () => localStorage.getItem("jwtToken"),
|
accessTokenFactory: () => localStorage.getItem("jwtToken"),
|
||||||
withCredentials: false,
|
withCredentials: false,
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user