Add network requests and validation
This commit is contained in:
1 parent
cec8ecd985
commit
9eaab0da1a
6 files changed
+63
-16
No files matched your search
@@ -58,9 +58,28 @@ class NetworkService {
|
||||
});
|
||||
}
|
||||
|
||||
async getMonitorsAndSummaryByTeamId(authToken, teamId, types) {
|
||||
const params = new URLSearchParams();
|
||||
|
||||
if (types) {
|
||||
types.forEach((type) => {
|
||||
params.append("type", type);
|
||||
});
|
||||
}
|
||||
return this.axiosInstance.get(
|
||||
`/monitors/team/summary/${teamId}?${params.toString()}`,
|
||||
{
|
||||
headers: {
|
||||
Authorization: `Bearer ${authToken}`,
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* ************************************
|
||||
* Get all uptime monitors for a user
|
||||
* Get all uptime monitors for a Team
|
||||
* ************************************
|
||||
*
|
||||
* @async
|
||||
|
||||
Reference in new issue
Block a user