mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-06-28 21:49:40 +02:00
17 lines
474 B
TypeScript
17 lines
474 B
TypeScript
|
|
import { reportList } from "@/contracts/types/reports.types";
|
||
|
|
import { baseApiService } from "./base-api.service";
|
||
|
|
|
||
|
|
const BASE = "/api/v1/reports";
|
||
|
|
|
||
|
|
class ReportsApiService {
|
||
|
|
list = async (searchSpaceId: number, limit = 200) => {
|
||
|
|
const qs = new URLSearchParams({
|
||
|
|
search_space_id: String(searchSpaceId),
|
||
|
|
limit: String(limit),
|
||
|
|
}).toString();
|
||
|
|
return baseApiService.get(`${BASE}?${qs}`, reportList);
|
||
|
|
};
|
||
|
|
}
|
||
|
|
|
||
|
|
export const reportsApiService = new ReportsApiService();
|