mirror of
https://github.com/nikdoof/pocket-id.git
synced 2025-12-18 20:39:20 +00:00
feat: add audit log with email notification (#26)
This commit is contained in:
20
frontend/src/lib/services/audit-log-service.ts
Normal file
20
frontend/src/lib/services/audit-log-service.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
import type { AuditLog } from '$lib/types/audit-log.type';
|
||||
import type { Paginated, PaginationRequest } from '$lib/types/pagination.type';
|
||||
import APIService from './api-service';
|
||||
|
||||
class AuditLogService extends APIService {
|
||||
async list(pagination?: PaginationRequest) {
|
||||
const page = pagination?.page || 1;
|
||||
const limit = pagination?.limit || 10;
|
||||
|
||||
const res = await this.api.get('/audit-logs', {
|
||||
params: {
|
||||
page,
|
||||
limit
|
||||
}
|
||||
});
|
||||
return res.data as Paginated<AuditLog>;
|
||||
}
|
||||
}
|
||||
|
||||
export default AuditLogService;
|
||||
Reference in New Issue
Block a user