Files
plane/space/ee/services/page.service.ts
Aaryan Khandelwal 4537b9c580 [WEB-1397] feat: page publish (#432)
* dev: workspace and project publish endpoints

* dev: update folder structure to match the global structure

* dev: add anchor to workspace and project pages

* dev: formatting errors

* dev: add public endpoint for pages

* dev: publish workflow added

* dev: update settings endpoint

* dev: space app pages

* chore: issue embeds in page publish

* fix: page not updating

* dev: added issue embed

* chore: separate edition specific code

* chore: update issue embed component

* refactor: space app pages store

* chore: issue embed error

---------

Co-authored-by: pablohashescobar <nikhilschacko@gmail.com>
Co-authored-by: NarayanBavisetti <narayan3119@gmail.com>
2024-06-19 18:24:46 +05:30

31 lines
832 B
TypeScript

// helpers
import { API_BASE_URL } from "@/helpers/common.helper";
// plane web types
import { TPageResponse } from "@/plane-web/types";
// services
import { APIService } from "@/services/api.service";
// types
import { IIssue } from "@/types/issue";
export class PageService extends APIService {
constructor() {
super(API_BASE_URL);
}
async fetchPageDetails(anchor: string): Promise<TPageResponse> {
return this.get(`/api/public/anchor/${anchor}/pages/`)
.then((response) => response?.data)
.catch((error) => {
throw error?.response;
});
}
async fetchPageIssueEmbeds(anchor: string): Promise<IIssue[]> {
return this.get(`/api/public/anchor/${anchor}/page-issues/`)
.then((response) => response?.data)
.catch((error) => {
throw error?.response;
});
}
}