Feat/monitor endpoint refactor (#463)
* Moved all methods to modules * removed old mongoDB file * Refactored endpoints to take query params, removed duplicate methods, updated routes, updated Client queries * Added comment * Add model differentiation * Add sort order, fix minor bug, add validation for query params
This commit is contained in:
1 parent
e47d3685ce
commit
477cad7cc9
11 files changed
+132
-166
No files matched your search
@@ -82,11 +82,14 @@ const DetailsPage = () => {
|
||||
|
||||
useEffect(() => {
|
||||
const fetchMonitor = async () => {
|
||||
const res = await axiosInstance.get(`/monitors/${monitorId}`, {
|
||||
headers: {
|
||||
Authorization: `Bearer ${authToken}`,
|
||||
},
|
||||
});
|
||||
const res = await axiosInstance.get(
|
||||
`/monitors/${monitorId}?sortOrder=asc`,
|
||||
{
|
||||
headers: {
|
||||
Authorization: `Bearer ${authToken}`,
|
||||
},
|
||||
}
|
||||
);
|
||||
setMonitor(res.data.data);
|
||||
const data = {
|
||||
cols: [
|
||||
|
||||
Reference in new issue
Block a user