feat(tickets): add detection discard workflow
This commit is contained in:
21
src/services/api/detection.service.ts
Normal file
21
src/services/api/detection.service.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
import { API_ROUTES } from '@/constants/apiRoutes';
|
||||
import type {
|
||||
DiscardDetectionPayload,
|
||||
DiscardDetectionResponse,
|
||||
} from '@/types';
|
||||
|
||||
import axiosClient from '../axios/axios';
|
||||
|
||||
export const detectionService = {
|
||||
discardDetection: async (
|
||||
detectionId: number,
|
||||
payload: DiscardDetectionPayload,
|
||||
): Promise<DiscardDetectionResponse> => {
|
||||
const response = await axiosClient.post<DiscardDetectionResponse>(
|
||||
API_ROUTES.DETECTIONS.DISCARD(detectionId),
|
||||
payload,
|
||||
);
|
||||
|
||||
return response.data;
|
||||
},
|
||||
};
|
||||
@@ -3,6 +3,7 @@ export * from './package.service';
|
||||
export * from './auth.service';
|
||||
export { chainageService } from './chainage.service';
|
||||
export * from './video.service';
|
||||
export * from './detection.service';
|
||||
export * from './permission.service';
|
||||
export * from './role.service';
|
||||
export * from './user.service';
|
||||
|
||||
Reference in New Issue
Block a user