bb-plane-fork/space/core/services/state.service.ts
sriram veeraghanta fa3aa362a9 fix: lint errors
2024-12-04 17:22:41 +05:30

18 lines
476 B
TypeScript

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