u
This commit is contained in:
19
src/api/globalHistory.js
Normal file
19
src/api/globalHistory.js
Normal file
@@ -0,0 +1,19 @@
|
||||
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}` : ''}`);
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user