Files
plane/space/core/services/cycle.service.ts

18 lines
493 B
TypeScript
Raw Permalink Normal View History

import { API_BASE_URL } from "@/helpers/common.helper";
import { APIService } from "@/services/api.service";
import { TPublicCycle } from "@/types/cycle";
export class CycleService extends APIService {
constructor() {
super(API_BASE_URL);
}
async getCycles(anchor: string): Promise<TPublicCycle[]> {
2024-08-01 14:12:57 +05:30
return this.get(`/api/public/anchor/${anchor}/cycles/`)
.then((response) => response?.data)
.catch((error) => {
throw error?.response?.data;
});
}
}