Refactor getChecksByUserId to getChecksByTeamId
This commit is contained in:
1 parent
c8c2dfe9ec
commit
eedc6bbed6
8 files changed
+27
-31
No files matched your search
@@ -46,9 +46,9 @@ const IncidentTable = ({ monitors, selectedMonitor, filter }) => {
|
||||
try {
|
||||
let res;
|
||||
if (selectedMonitor === "0") {
|
||||
res = await networkService.getChecksByUser(
|
||||
res = await networkService.getChecksByTeam(
|
||||
authToken,
|
||||
user._id,
|
||||
user.teamId,
|
||||
"desc",
|
||||
null,
|
||||
null,
|
||||
|
||||
@@ -50,14 +50,14 @@ const Incidents = () => {
|
||||
setLoading(true);
|
||||
const res = await networkService.getMonitorsByTeamId(
|
||||
authState.authToken,
|
||||
authState.user._id,
|
||||
authState.user.teamId,
|
||||
1,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null
|
||||
);
|
||||
|
||||
console.log(res);
|
||||
// Reduce to a lookup object for 0(1) lookup
|
||||
if (res.data && res.data.data.length > 0) {
|
||||
const monitorLookup = res.data.data.reduce((acc, monitor) => {
|
||||
|
||||
Reference in new issue
Block a user