bb-plane-fork/space/core/services/label.service.ts
guru_sainath 1b92a18ef8
chore: updated the ssr rendering on sites (#6145)
* fix: refactoring

* fix: site ssr implementation

* chore: fixed auto reload on file change in sites

* chore: updated constant imports and globalised powerBy component

* chore: resolved lint and updated the env

---------

Co-authored-by: sriram veeraghanta <veeraghanta.sriram@gmail.com>
2024-12-04 14:24:53 +05:30

18 lines
486 B
TypeScript

import { IIssueLabel } from "@plane/types";
import { API_BASE_URL } from "@plane/constants";
// services
import { APIService } from "./api.service";
export class LabelService extends APIService {
constructor() {
super(API_BASE_URL);
}
async getLabels(anchor: string): Promise<IIssueLabel[]> {
return this.get(`/api/public/anchor/${anchor}/labels/`)
.then((response) => response?.data)
.catch((error) => {
throw error?.response?.data;
});
}
}