File tree Expand file tree Collapse file tree 1 file changed +9
-8
lines changed
adminforth/documentation/docs/tutorial/05-Plugins Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -165,14 +165,15 @@ app.get(`${ADMIN_BASE_URL}/api/dashboard/`,
165165 admin .express .authorize (
166166 async (req , res ) => {
167167
168- admin .getPluginByClassName <AuditLogPlugin >(' AuditLogPlugin' ).logCustomAction (
169- ' aparts' ,
170- null , // recordId can be null if not applicable
171- ' visitedDashboard' ,
172- { dashboard: ' main' },
173- req .adminUser ,
174- req .headers // required if you want log client ip
175- )
168+ admin .getPluginByClassName <AuditLogPlugin >(' AuditLogPlugin' ).logCustomAction ({
169+ resourceId: ' aparts' ,
170+ recordId: null , // recordId can be null if not applicable
171+ actionId: ' visitedDashboard' , // any random string you want to useto identify this action
172+ oldData: null , // old data, can be null if not applicable
173+ data: { dashboard: ' main' }, // new data or any data you want to log
174+ user: req .adminUser ,
175+ headers: req .headers // required if you want log client ip
176+ })
176177
177178 ... .
178179
You can’t perform that action at this time.
0 commit comments