feat(ticket): add issues map to ticket assignment page
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
import { API_ROUTES } from '@/constants/apiRoutes';
|
||||
import type {
|
||||
DetectionCoordinatesParams,
|
||||
DetectionCoordinatesResponse,
|
||||
DiscardDetectionPayload,
|
||||
DiscardDetectionResponse,
|
||||
ReviewDetectionRepairProofPayload,
|
||||
@@ -9,6 +11,33 @@ import type {
|
||||
import axiosClient from '../axios/axios';
|
||||
|
||||
export const detectionService = {
|
||||
getCoordinates: async (
|
||||
videoId: string,
|
||||
params?: DetectionCoordinatesParams,
|
||||
): Promise<DetectionCoordinatesResponse> => {
|
||||
const searchParams = new URLSearchParams();
|
||||
|
||||
params?.class_name?.forEach((className) => {
|
||||
searchParams.append('class_name', className);
|
||||
});
|
||||
if (params?.skip !== undefined) {
|
||||
searchParams.set('skip', String(params.skip));
|
||||
}
|
||||
if (params?.limit !== undefined) {
|
||||
searchParams.set('limit', String(params.limit));
|
||||
}
|
||||
if (params?.search) {
|
||||
searchParams.set('search', params.search);
|
||||
}
|
||||
|
||||
const response = await axiosClient.get<DetectionCoordinatesResponse>(
|
||||
API_ROUTES.VIDEOS.COORDINATES(videoId),
|
||||
{ params: searchParams },
|
||||
);
|
||||
|
||||
return response.data;
|
||||
},
|
||||
|
||||
discardDetection: async (
|
||||
detectionId: number,
|
||||
payload: DiscardDetectionPayload,
|
||||
|
||||
Reference in New Issue
Block a user