mirror of
https://github.com/makeplane/plane.git
synced 2026-07-12 21:40:18 +02:00
* 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>
31 lines
832 B
TypeScript
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;
|
|
});
|
|
}
|
|
}
|