mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-27 00:52:50 +00:00
15 lines
481 B
TypeScript
15 lines
481 B
TypeScript
import { api as client } from "../auth/http";
|
|
import { unwrap } from "@/utils/endpoint";
|
|
import { URL_CONSTANTS } from "@/constants/URLS";
|
|
import type { ReportQueryInput, ReportResult } from "@/types/reports";
|
|
|
|
export const reportsService = {
|
|
run: async ({ key, ...params }: ReportQueryInput): Promise<ReportResult> => {
|
|
const response = await client.get<ReportResult>(
|
|
URL_CONSTANTS.REPORTS.RUN(key),
|
|
{ params },
|
|
);
|
|
return unwrap(response.data);
|
|
},
|
|
};
|