updated autmation api
This commit is contained in:
1 parent
32589b7c64
commit
6995136704
2 files changed
+6
-3
No files matched your search
@@ -4,8 +4,12 @@ import { makeRemoteAPI } from "./base";
|
||||
import { useAPIService } from './core';
|
||||
import {useMockAPI} from "./mock";
|
||||
|
||||
const locationPrefixWeb = window.location.pathname.match(/(.+)\/web/i);
|
||||
|
||||
export const useConnectedApiService = () => useAPIService(
|
||||
makeAutomationAPI(makeRemoteAPI("/automations"))
|
||||
makeAutomationAPI(makeRemoteAPI(
|
||||
(!locationPrefixWeb ? '' : locationPrefixWeb[1]) + "/automations"
|
||||
))
|
||||
);
|
||||
export const useMockApiService = (initialAutos: AutomationData[]) => useAPIService(
|
||||
makeAutomationAPI(useMockAPI(initialAutos))
|
||||
|
||||
Reference in new issue
Block a user