diff --git a/.env b/.env index 31d922b..f54b1e9 100644 --- a/.env +++ b/.env @@ -2,4 +2,6 @@ REACT_APP_IDENTITY_AUTHENTICATION_URL=https://toodle.ddns.net/identity-server-api/identity/authenticate?UserName={username}&Password={password} REACT_APP_NETWORK_RESURRECTOR_API_URL=http://localhost:5064 -REACT_APP_NETWORK_RESURRECTOR_SERVER_URL=http://localhost:5062 \ No newline at end of file +#REACT_APP_NETWORK_RESURRECTOR_SERVER_URL=http://localhost:5062 + +REACT_APP_NETWORK_RESURRECTOR_SERVER_URL=https://toodle.ddns.net/network-resurrector-api \ No newline at end of file diff --git a/src/features/machines/api.js b/src/features/machines/api.js index 2f73eb5..be062d7 100644 --- a/src/features/machines/api.js +++ b/src/features/machines/api.js @@ -1,4 +1,4 @@ -import { get } from "../../utils/axios"; +import { get, post } from "../../utils/axios"; const apiUrl = `${process.env.REACT_APP_NETWORK_RESURRECTOR_API_URL}/network`; const serverUrl = `${process.env.REACT_APP_NETWORK_RESURRECTOR_SERVER_URL}/resurrector`; @@ -9,12 +9,12 @@ const readMachines = () => { }; const wakeMachine = macAddress => { - const promise = get(`${serverUrl}/wake`, { macAddress }); + const promise = post(`${serverUrl}/wake`, { macAddress }); return promise; }; const pingMachine = ipAddressOrMachineName => { - const promise = get(`${serverUrl}/ping`, { ipAddressOrMachineName }); + const promise = post(`${serverUrl}/ping`, { ipAddressOrMachineName }); return promise; }; diff --git a/src/features/machines/components/MachineItem.js b/src/features/machines/components/MachineItem.js index 2e924b6..1bc8a8a 100644 --- a/src/features/machines/components/MachineItem.js +++ b/src/features/machines/components/MachineItem.js @@ -45,7 +45,10 @@ const MachineItem = ({ machine, actions }) => { <> {actions.map(action => ( - +