chore: page and cycle refactor (#1159)

* fix: release note modal fix

* chore: cycle and page endpoint refactor
This commit is contained in:
Anmol Singh Bhatia
2023-05-29 18:35:16 +05:30
committed by GitHub
parent 26ba4d71c3
commit c8caa925b1
16 changed files with 51 additions and 50 deletions

View File

@@ -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) => {

View File

@@ -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) => {