Files
plane/space/core/services/module.service.ts
rahulramesha 8577a56068 [WEB-1255] chore: Required Spaces refactor (#5177)
* Changes required to enable Publish Views

* default views to not found page

* refactor exports

* remove uncessary view service

* fix review comments
2024-07-22 16:01:46 +05:30

18 lines
499 B
TypeScript

import { API_BASE_URL } from "@/helpers/common.helper";
import { APIService } from "@/services/api.service";
import { TPublicModule } from "@/types/modules";
export class ModuleService extends APIService {
constructor() {
super(API_BASE_URL);
}
async getModules(anchor: string): Promise<TPublicModule[]> {
return this.get(`api/public/anchor/${anchor}/modules/`)
.then((response) => response?.data)
.catch((error) => {
throw error?.response?.data;
});
}
}