diff --git a/frontend/modules/core/services/audit-logs.ts b/frontend/modules/core/services/audit-logs.ts index 832bc7b..3af46d7 100644 --- a/frontend/modules/core/services/audit-logs.ts +++ b/frontend/modules/core/services/audit-logs.ts @@ -27,9 +27,9 @@ export type AuditLogPage = { totalItems: number } -export type AuditLogEntityType = { +export type AuditLogEntityTypes = { '@id'?: string - value: string + entityTypes: string[] } export function useAuditLogService() { @@ -55,8 +55,10 @@ export function useAuditLogService() { } async function entityTypes(): Promise { - const data = await api.get>('/audit-log-entity-types') - return extractHydraMembers(data).map((entry) => entry.value) + // `/audit-log-entity-types` is a single API Platform item resource + // (not a hydra collection): it returns `{ entityTypes: string[] }`. + const data = await api.get('/audit-log-entity-types') + return data.entityTypes ?? [] } return { list, entityTypes }