fix: spliting out the project members from project store and service (#2739)

This commit is contained in:
sriram veeraghanta 2023-11-09 17:56:55 +05:30 committed by GitHub
parent 7676aab773
commit 79df59f618
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
66 changed files with 496 additions and 415 deletions

View file

@ -1,38 +0,0 @@
import { APIService } from "services/api.service";
import { TrackEventService } from "services/track_event.service";
// types
import { IUser } from "types";
// helpers
import { API_BASE_URL } from "helpers/common.helper";
const trackEventService = new TrackEventService();
export class ProjectExportService extends APIService {
constructor() {
super(API_BASE_URL);
}
async csvExport(
workspaceSlug: string,
data: {
provider: string;
project: string[];
},
user: IUser
): Promise<any> {
return this.post(`/api/workspaces/${workspaceSlug}/export-issues/`, data)
.then((response) => {
trackEventService.trackExporterEvent(
{
workspaceSlug,
},
"CSV_EXPORTER_CREATE",
user
);
return response?.data;
})
.catch((error) => {
throw error?.response?.data;
});
}
}