Files
plane/web/services/instance.service.ts
sriram veeraghanta ce18ce6f72 feat: Plane one Change log. (#357)
* 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>
2024-06-05 20:44:41 +05:30

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;
});
}
}