Refacoted API url
This commit is contained in:
1 parent
6bd1cee24f
commit
b4cee7e065
2 files changed
+4
-2
No files matched your search
@@ -12,7 +12,9 @@ export const getMonitors = createAsyncThunk(
|
||||
"monitors/getMonitors",
|
||||
async (token, thunkApi) => {
|
||||
try {
|
||||
const res = await axios.get("http://localhost:5000/api/v1/monitors");
|
||||
const res = await axios.get(
|
||||
import.meta.env.VITE_APP_API_BASE_URL + "/monitors"
|
||||
);
|
||||
return res.data;
|
||||
} catch (error) {
|
||||
return thunkApi.rejectWithValue(error.response.data);
|
||||
|
||||
Reference in new issue
Block a user