remove teamId from uptime monitor requests
This commit is contained in:
1 parent
134e547736
commit
d9c2f31f4e
5 files changed
+16
-66
No files matched your search
@@ -6,7 +6,7 @@ import { useMonitorUtils } from "./useMonitorUtils";
|
||||
import { useNavigate } from "react-router-dom";
|
||||
import { useTranslation } from "react-i18next";
|
||||
|
||||
const useFetchMonitorsWithSummary = ({ teamId, types, monitorUpdateTrigger }) => {
|
||||
const useFetchMonitorsWithSummary = ({ types, monitorUpdateTrigger }) => {
|
||||
const [isLoading, setIsLoading] = useState(false);
|
||||
const [monitors, setMonitors] = useState(undefined);
|
||||
const [monitorsSummary, setMonitorsSummary] = useState(undefined);
|
||||
@@ -17,7 +17,6 @@ const useFetchMonitorsWithSummary = ({ teamId, types, monitorUpdateTrigger }) =>
|
||||
try {
|
||||
setIsLoading(true);
|
||||
const res = await networkService.getMonitorsWithSummaryByTeamId({
|
||||
teamId,
|
||||
types,
|
||||
});
|
||||
const { monitors, summary } = res?.data?.data ?? {};
|
||||
@@ -34,12 +33,11 @@ const useFetchMonitorsWithSummary = ({ teamId, types, monitorUpdateTrigger }) =>
|
||||
}
|
||||
};
|
||||
fetchMonitors();
|
||||
}, [teamId, types, monitorUpdateTrigger]);
|
||||
}, [types, monitorUpdateTrigger]);
|
||||
return [monitors, monitorsSummary, isLoading, networkError];
|
||||
};
|
||||
|
||||
const useFetchMonitorsWithChecks = ({
|
||||
teamId,
|
||||
types,
|
||||
limit,
|
||||
page,
|
||||
@@ -61,7 +59,6 @@ const useFetchMonitorsWithChecks = ({
|
||||
try {
|
||||
setIsLoading(true);
|
||||
const res = await networkService.getMonitorsWithChecksByTeamId({
|
||||
teamId,
|
||||
limit,
|
||||
types,
|
||||
page,
|
||||
@@ -95,7 +92,6 @@ const useFetchMonitorsWithChecks = ({
|
||||
order,
|
||||
page,
|
||||
rowsPerPage,
|
||||
teamId,
|
||||
theme,
|
||||
types,
|
||||
monitorUpdateTrigger,
|
||||
@@ -104,7 +100,6 @@ const useFetchMonitorsWithChecks = ({
|
||||
};
|
||||
|
||||
const useFetchMonitorsByTeamId = ({
|
||||
teamId,
|
||||
types,
|
||||
limit,
|
||||
page,
|
||||
@@ -127,7 +122,6 @@ const useFetchMonitorsByTeamId = ({
|
||||
try {
|
||||
setIsLoading(true);
|
||||
const res = await networkService.getMonitorsByTeamId({
|
||||
teamId,
|
||||
limit,
|
||||
types,
|
||||
page,
|
||||
@@ -154,7 +148,6 @@ const useFetchMonitorsByTeamId = ({
|
||||
};
|
||||
fetchMonitors();
|
||||
}, [
|
||||
teamId,
|
||||
types,
|
||||
limit,
|
||||
page,
|
||||
|
||||
Reference in new issue
Block a user