openpanel/packages/cli/templates/provider/demo-audit-log-provider.tsx
Stefan Pejcic 8595a9f4e5 back
2024-05-08 19:58:53 +02:00

63 lines
1.3 KiB
TypeScript

import { AuditLogProvider } from "@refinedev/core";
/**
* Check out the Audit Log Provider documentation for detailed information
* https://refine.dev/docs/api-reference/core/providers/audit-log-provider
**/
export const auditLogProvider: AuditLogProvider = {
get: async ({ resource, meta, action, author, metaData }) => {
console.log("get", {
resource,
meta,
action,
author,
metaData,
});
// TODO: send request to the API
return {};
},
create: async ({ resource, meta, action, author, data, previousData }) => {
console.log("create", {
resource,
meta,
action,
author,
data,
previousData,
});
// TODO: send request to the API
return {};
},
update: async ({
resource,
meta,
action,
author,
data,
previousData,
id,
name,
}) => {
console.log("update", {
resource,
meta,
action,
author,
data,
previousData,
id,
name,
});
// TODO: send request to the API
return {};
},
};