mirror of
https://github.com/makeplane/plane.git
synced 2026-09-03 12:50:29 +02:00
* chore: add plane one badge and changelog modal. * chore: added markdown renderer. * fix: register instance * fix: plane one badge changes * fix: change log endpoint and billing page changes * fix: changelog markdown rendering * dev: update the cron * fix: removing print statements * fix: spell mistakes --------- Co-authored-by: Prateek Shourya <prateekshourya29@gmail.com> Co-authored-by: pablohashescobar <nikhilschacko@gmail.com>
37 lines
932 B
TypeScript
37 lines
932 B
TypeScript
// types
|
|
import type { IInstanceInfo, IInstanceChangeLog } from "@plane/types";
|
|
// helpers
|
|
import { API_BASE_URL } from "@/helpers/common.helper";
|
|
// services
|
|
import { APIService } from "@/services/api.service";
|
|
|
|
export class InstanceService extends APIService {
|
|
constructor() {
|
|
super(API_BASE_URL);
|
|
}
|
|
|
|
async requestCSRFToken(): Promise<{ csrf_token: string }> {
|
|
return this.get("/auth/get-csrf-token/")
|
|
.then((response) => response.data)
|
|
.catch((error) => {
|
|
throw error;
|
|
});
|
|
}
|
|
|
|
async getInstanceInfo(): Promise<IInstanceInfo> {
|
|
return this.get("/api/instances/")
|
|
.then((response) => response.data)
|
|
.catch((error) => {
|
|
throw error;
|
|
});
|
|
}
|
|
|
|
async getInstanceChangeLog(): Promise<IInstanceChangeLog[]> {
|
|
return this.get("/api/instances/changelog/")
|
|
.then((response) => response.data)
|
|
.catch((error) => {
|
|
throw error;
|
|
});
|
|
}
|
|
}
|