bb-plane-fork/space/core/services/label.service.ts
2024-08-01 14:12:57 +05:30

17 lines
481 B
TypeScript

import { IIssueLabel } from "@plane/types";
import { API_BASE_URL } from "@/helpers/common.helper";
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;
});
}
}