Skip to content

Commit 30b23a3

Browse files
authored
Merge pull request #131 from sourcefuse/automated-docs-sync/loopback4-audit-log
Sync loopback4-audit-log Docs
2 parents e76450e + c56f7d7 commit 30b23a3

File tree

1 file changed

+14
-1
lines changed
  • docs/arc-api-docs/extensions/loopback4-audit-log

1 file changed

+14
-1
lines changed

docs/arc-api-docs/extensions/loopback4-audit-log/README.md

+14-1
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,20 @@ export class GroupRepository extends AuditRepositoryMixin<
220220
}
221221
```
222222

223-
You can pass any extra attributes to save into audit table using the `IAuditMixinOptions` parameter of mixin function.
223+
You can pass any extra attributes to save into audit table using the `IAuditMixinOptions` parameter of mixin function. You can also pass some dynamic values to the extra columns of the audit-log table via the method options.
224+
225+
```ts
226+
const groupAuditOpts: IAuditMixinOptions = {
227+
actionKey: 'Group_Logs',
228+
extra: 'static value',
229+
};
230+
```
231+
232+
```ts
233+
repo.create(data, {extra: 'random calculated value'});
234+
```
235+
236+
So the method options will have a priority over repository mixin options.
224237

225238
Make sure you provide `getCurrentUser` and `getAuditLogRepository` Getter functions in constructor.
226239

0 commit comments

Comments
 (0)