Skip to content

Commit a629dfd

Browse files
committed
fix: add adminforth instance into custom action
1 parent 30fcc29 commit a629dfd

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

adminforth/modules/restApi.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1201,7 +1201,7 @@ export default class AdminForthRestAPI implements IAdminForthRestAPI {
12011201
return { error: await tr(`Action {actionId} not found`, 'errors', { actionId }) };
12021202
}
12031203

1204-
const response = await action.action({ recordId, adminUser, resource, tr });
1204+
const response = await action.action({ recordId, adminUser, resource, tr, adminforth: this.adminforth });
12051205

12061206
return {
12071207
actionId,

adminforth/types/Back.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -723,6 +723,7 @@ interface AdminForthInputConfigCustomization {
723723
export interface AdminForthActionInput {
724724
name: string,
725725
action: (params: {
726+
adminforth: IAdminForth,
726727
resource: AdminForthResource,
727728
recordId: string,
728729
adminUser: AdminUser,

0 commit comments

Comments
 (0)