fix: new project issues response (#303)

This commit is contained in:
Aaryan Khandelwal 2023-02-18 21:19:04 +05:30 committed by GitHub
parent 393638c700
commit 77c319c748
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
21 changed files with 105 additions and 141 deletions

View file

@ -1,7 +1,7 @@
// services
import APIService from "services/api.service";
// type
import type { IIssue, IIssueActivity, IIssueComment, IssueResponse } from "types";
import type { IIssue, IIssueActivity, IIssueComment } from "types";
const { NEXT_PUBLIC_API_BASE_URL } = process.env;
@ -18,7 +18,7 @@ class ProjectIssuesServices extends APIService {
});
}
async getIssues(workspaceSlug: string, projectId: string): Promise<IssueResponse> {
async getIssues(workspaceSlug: string, projectId: string): Promise<IIssue[]> {
return this.get(`/api/workspaces/${workspaceSlug}/projects/${projectId}/issues/`)
.then((response) => response?.data)
.catch((error) => {