forked from github/plane
chore: page and cycle refactor (#1159)
* fix: release note modal fix * chore: cycle and page endpoint refactor
This commit is contained in:
committed by
GitHub
parent
26ba4d71c3
commit
c8caa925b1
@@ -29,10 +29,12 @@ class ProjectCycleServices extends APIService {
|
||||
async getCyclesWithParams(
|
||||
workspaceSlug: string,
|
||||
projectId: string,
|
||||
queries: any
|
||||
cycleType: "all" | "current" | "upcoming" | "draft" | "completed" | "incomplete"
|
||||
): Promise<ICycle[]> {
|
||||
return this.get(`/api/workspaces/${workspaceSlug}/projects/${projectId}/cycles/`, {
|
||||
params: queries,
|
||||
params: {
|
||||
cycle_view: cycleType,
|
||||
},
|
||||
})
|
||||
.then((response) => response?.data)
|
||||
.catch((error) => {
|
||||
|
||||
@@ -86,10 +86,12 @@ class PageServices extends APIService {
|
||||
async getPagesWithParams(
|
||||
workspaceSlug: string,
|
||||
projectId: string,
|
||||
queries: any
|
||||
pageType: "all" | "favorite" | "created_by_me" | "created_by_other"
|
||||
): Promise<IPage[]> {
|
||||
return this.get(`/api/workspaces/${workspaceSlug}/projects/${projectId}/pages/`, {
|
||||
params: queries,
|
||||
params: {
|
||||
page_view: pageType,
|
||||
},
|
||||
})
|
||||
.then((response) => response?.data)
|
||||
.catch((error) => {
|
||||
|
||||
Reference in New Issue
Block a user