trying to just redirect ws
This commit is contained in:
1 parent
e6e51be5a5
commit
079f353dbf
8 files changed
+114
-60
No files matched your search
@@ -5,15 +5,15 @@ import { useAPIService } from './core';
|
||||
import { useMockAPI } from "./mock";
|
||||
|
||||
const locationPrefixWeb = window.location.pathname.match(/(.+)\/web/i);
|
||||
const baseURL = process.env.NODE_ENV === 'development' ?
|
||||
"http://localhost:8000" :
|
||||
(!locationPrefixWeb ? '' : locationPrefixWeb[1]);
|
||||
|
||||
export const remoteDetailsAPI = makeRemoteAPI(
|
||||
baseURL + "/details"
|
||||
const baseURL = new URL(
|
||||
process.env.NODE_ENV === 'development' ?
|
||||
"http://localhost:8000" :
|
||||
(!locationPrefixWeb ? '' : locationPrefixWeb[1])
|
||||
);
|
||||
export const wsURL = baseURL + "socket"
|
||||
console.log({ baseURL, wsURL })
|
||||
export const remoteAutoAPI = makeRemoteAPI(
|
||||
baseURL + "/automations"
|
||||
baseURL + "automations"
|
||||
);
|
||||
export const useConnectedApiService = () => useAPIService(
|
||||
makeAutomationAPI(remoteAutoAPI)
|
||||
|
||||
Reference in new issue
Block a user