add network op

This commit is contained in:
Alex Holliday committed 2025-03-14 10:06:36 -07:00
1 parent dc6c947043
commit 4b166ceca3
1 file changed
+23
+23
View File
@@ -1033,6 +1033,29 @@ class NetworkService {
return this.axiosInstance.delete(`/status-page/${encodedUrl}`, {});
}
// ************************************
// Fetch monitors with summary by TeamID
// ************************************
async getMonitorsWithSummaryByTeamId(config) {
const { teamId, types } = config;
const params = new URLSearchParams();
if (types) {
types.forEach((type) => {
params.append("type", type);
});
}
return this.axiosInstance.get(
`/monitors/summary/team/${teamId}?${params.toString()}`,
{
headers: {
"Content-Type": "application/json",
},
}
);
}
}
export default NetworkService;