Merge branch 'master' of github.com:makeplane/plane into build/merge_frontend_backend
This commit is contained in:
commit
45fe4b89db
55 changed files with 5928 additions and 937 deletions
|
|
@ -78,10 +78,11 @@ abstract class APIService {
|
|||
});
|
||||
}
|
||||
|
||||
delete(url: string, config = {}): Promise<any> {
|
||||
delete(url: string, data?: any, config = {}): Promise<any> {
|
||||
return axios({
|
||||
method: "delete",
|
||||
url: this.baseURL + url,
|
||||
data: data,
|
||||
headers: this.getAccessToken() ? this.getHeaders() : {},
|
||||
...config,
|
||||
});
|
||||
|
|
|
|||
|
|
@ -8,6 +8,8 @@ import {
|
|||
ISSUE_PROPERTIES_ENDPOINT,
|
||||
CYCLE_DETAIL,
|
||||
ISSUE_LABELS,
|
||||
BULK_DELETE_ISSUES,
|
||||
BULK_ADD_ISSUES_TO_CYCLE,
|
||||
} from "constants/api-routes";
|
||||
// services
|
||||
import APIService from "lib/services/api.service";
|
||||
|
|
@ -92,8 +94,6 @@ class ProjectIssuesServices extends APIService {
|
|||
issue: string;
|
||||
}
|
||||
) {
|
||||
console.log(data);
|
||||
|
||||
return this.post(CYCLE_DETAIL(workspace_slug, projectId, cycleId), data)
|
||||
.then((response) => {
|
||||
return response?.data;
|
||||
|
|
@ -237,6 +237,31 @@ class ProjectIssuesServices extends APIService {
|
|||
throw error?.response?.data;
|
||||
});
|
||||
}
|
||||
|
||||
async bulkDeleteIssues(workspace_slug: string, projectId: string, data: any): Promise<any> {
|
||||
return this.delete(BULK_DELETE_ISSUES(workspace_slug, projectId), data)
|
||||
.then((response) => {
|
||||
return response?.data;
|
||||
})
|
||||
.catch((error) => {
|
||||
throw error?.response?.data;
|
||||
});
|
||||
}
|
||||
|
||||
async bulkAddIssuesToCycle(
|
||||
workspace_slug: string,
|
||||
projectId: string,
|
||||
cycleId: string,
|
||||
data: any
|
||||
): Promise<any> {
|
||||
return this.post(BULK_ADD_ISSUES_TO_CYCLE(workspace_slug, projectId, cycleId), data)
|
||||
.then((response) => {
|
||||
return response?.data;
|
||||
})
|
||||
.catch((error) => {
|
||||
throw error?.response?.data;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
export default new ProjectIssuesServices();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue