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);
|
||||
|
||||
+1
-1
@@ -63,7 +63,7 @@ app.use((req, res, next) => {
|
||||
|
||||
//routes
|
||||
app.use("/api/v1/auth", authRouter);
|
||||
app.use("/api/v1/monitors", verifyJWT, monitorRouter);
|
||||
app.use("/api/v1/monitors", monitorRouter);
|
||||
app.use("/api/v1/checks", verifyJWT, checkRouter);
|
||||
app.use("/api/v1/alerts", verifyJWT, alertRouter);
|
||||
|
||||
|
||||
Reference in new issue
Block a user