Add type to status page request, add get status pages by team request
This commit is contained in:
1 parent
8d93a7e63b
commit
cb4e739cae
1 file changed
+16
-2
@@ -991,8 +991,21 @@ class NetworkService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async getStatusPageByUrl(config) {
|
async getStatusPageByUrl(config) {
|
||||||
const { authToken, url } = config;
|
const { authToken, url, type } = config;
|
||||||
return this.axiosInstance.get(`/status-page/${url}`, {
|
const params = new URLSearchParams();
|
||||||
|
params.append("type", type);
|
||||||
|
|
||||||
|
return this.axiosInstance.get(`/status-page/${url}?${params.toString()}`, {
|
||||||
|
headers: {
|
||||||
|
Authorization: `Bearer ${authToken}`,
|
||||||
|
"Content-Type": "application/json",
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
async getStatusPagesByTeamId(config) {
|
||||||
|
const { authToken, teamId } = config;
|
||||||
|
return this.axiosInstance.get(`/status-page/team/${teamId}`, {
|
||||||
headers: {
|
headers: {
|
||||||
Authorization: `Bearer ${authToken}`,
|
Authorization: `Bearer ${authToken}`,
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
@@ -1005,6 +1018,7 @@ class NetworkService {
|
|||||||
const fd = new FormData();
|
const fd = new FormData();
|
||||||
fd.append("teamId", user.teamId);
|
fd.append("teamId", user.teamId);
|
||||||
fd.append("userId", user._id);
|
fd.append("userId", user._id);
|
||||||
|
fd.append("type", form.type);
|
||||||
form.isPublished && fd.append("isPublished", form.isPublished);
|
form.isPublished && fd.append("isPublished", form.isPublished);
|
||||||
form.companyName && fd.append("companyName", form.companyName);
|
form.companyName && fd.append("companyName", form.companyName);
|
||||||
form.url && fd.append("url", form.url);
|
form.url && fd.append("url", form.url);
|
||||||
|
|||||||
Reference in new issue
Block a user