refactor networkSerivce.getMonitorsByTeamId to take a config objet

This commit is contained in:
Alex Holliday committed 2024-09-18 10:57:44 +08:00
1 parent cab023709b
commit 4748afb93a
5 files changed
+74 -58

No files matched your search

@@ -142,20 +142,20 @@ const MonitorTable = ({ isAdmin }) => {
try {
const { authToken } = authState;
const user = jwtDecode(authToken);
const res = await networkService.getMonitorsByTeamId(
const res = await networkService.getMonitorsByTeamId({
authToken,
user.teamId,
25,
["http", "ping"],
null,
"desc",
true,
page,
rowsPerPage,
null,
null,
null
);
teamId: user.teamId,
limit: 25,
types: ["http", "ping"],
status: null,
checkOrder: "desc",
normalize: true,
page: page,
rowsPerPage: rowsPerPage,
filter: null,
field: null,
order: null,
});
setMonitors(res?.data?.data?.monitors ?? []);
setMonitorCount(res?.data?.data?.monitorCount ?? 0);
} catch (error) {