plane/apps/space/services/issue.service.ts
guru_sainath b406a70e72
fix: access environment variables is changed in services (#1930)
Co-authored-by: Sainath <sainath@Sainaths-MacBook-Pro.local>
2023-08-22 01:13:51 +05:30

19 lines
533 B
TypeScript

// services
import APIService from "services/api.service";
class IssueService extends APIService {
constructor() {
super(process.env.NEXT_PUBLIC_API_BASE_URL || "http://localhost:8000");
}
async getPublicIssues(workspace_slug: string, project_slug: string): Promise<any> {
return this.get(`/api/public/workspaces/${workspace_slug}/project-boards/${project_slug}/issues/`)
.then((response) => response?.data)
.catch((error) => {
throw error?.response;
});
}
}
export default IssueService;