细节优化——1
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
import { apiGet } from "./axios";
|
||||
import { apiDelete, apiGet } from "./axios";
|
||||
import type { ApiListResponse } from "../types/api";
|
||||
|
||||
export const fetchAuditLogs = (studyId: string, params?: Record<string, any>) =>
|
||||
apiGet<ApiListResponse<any>>(`/api/v1/studies/${studyId}/audit-logs/`, { params });
|
||||
|
||||
export const deleteAuditLog = (studyId: string, logId: string) =>
|
||||
apiDelete(`/api/v1/studies/${studyId}/audit-logs/${logId}`);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { apiGet, apiPost } from "./axios";
|
||||
import { apiGet, apiPost, apiDelete } from "./axios";
|
||||
|
||||
export const fetchComments = (studyId: string, entityType: string, entityId: string) =>
|
||||
apiGet(`/api/v1/studies/${studyId}/${entityType}/${entityId}/comments`);
|
||||
@@ -9,3 +9,6 @@ export const createComment = (
|
||||
entityId: string,
|
||||
payload: Record<string, any>
|
||||
) => apiPost(`/api/v1/studies/${studyId}/${entityType}/${entityId}/comments`, payload);
|
||||
|
||||
export const deleteComment = (studyId: string, entityType: string, entityId: string, commentId: string) =>
|
||||
apiDelete(`/api/v1/studies/${studyId}/${entityType}/${entityId}/comments/${commentId}`);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { apiGet, apiPost, apiPatch } from "./axios";
|
||||
import { apiGet, apiPost, apiPatch, apiDelete } from "./axios";
|
||||
import type { ApiListResponse } from "../types/api";
|
||||
|
||||
export const fetchMilestones = (studyId: string) =>
|
||||
@@ -9,3 +9,6 @@ export const createMilestone = (studyId: string, payload: Record<string, any>) =
|
||||
|
||||
export const updateMilestone = (studyId: string, milestoneId: string, payload: Record<string, any>) =>
|
||||
apiPatch(`/api/v1/studies/${studyId}/milestones/${milestoneId}`, payload);
|
||||
|
||||
export const deleteMilestone = (studyId: string, milestoneId: string) =>
|
||||
apiDelete(`/api/v1/studies/${studyId}/milestones/${milestoneId}`);
|
||||
|
||||
Reference in New Issue
Block a user