mirror of
https://github.com/pocket-id/pocket-id.git
synced 2026-04-01 04:06:36 +00:00
22 lines
515 B
TypeScript
22 lines
515 B
TypeScript
import AuditLogService from '$lib/services/audit-log-service';
|
|
import type { SearchPaginationSortRequest } from '$lib/types/pagination.type';
|
|
import type { PageLoad } from './$types';
|
|
|
|
export const load: PageLoad = async () => {
|
|
const auditLogService = new AuditLogService();
|
|
|
|
const requestOptions: SearchPaginationSortRequest = {
|
|
sort: {
|
|
column: 'createdAt',
|
|
direction: 'desc'
|
|
}
|
|
};
|
|
|
|
const auditLogs = await auditLogService.listAllLogs(requestOptions);
|
|
|
|
return {
|
|
auditLogs,
|
|
requestOptions
|
|
};
|
|
};
|