Files
dashfront/src/api/globalHistory.js
2026-10-10 00:39:23 +02:00

20 lines
821 B
JavaScript

import { http } from './http.js';
export const globalHistory = {
/**
* GET /api/history
* Global system/entity history with paging/sorting/filtering
*/
list({ startRow, endRow, offset, limit, sortModel, filterModel } = {}) {
const params = new URLSearchParams();
if (startRow != null) params.set('startRow', String(startRow));
if (endRow != null) params.set('endRow', String(endRow));
if (offset != null) params.set('offset', String(offset));
if (limit != null) params.set('limit', String(limit));
if (sortModel && sortModel.length) params.set('sort', JSON.stringify(sortModel));
if (filterModel && Object.keys(filterModel).length) params.set('filter', JSON.stringify(filterModel));
const qs = params.toString();
return http(`/api/history${qs ? `?${qs}` : ''}`);
},
};