Skip to content

Commit 2cc9ee7

Browse files
committed
fix: add headers to the action extra params
1 parent 57c7b01 commit 2cc9ee7

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

adminforth/modules/restApi.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1487,7 +1487,7 @@ export default class AdminForthRestAPI implements IAdminForthRestAPI {
14871487
server.endpoint({
14881488
method: 'POST',
14891489
path: '/start_custom_action',
1490-
handler: async ({ body, adminUser, tr, cookies, response }) => {
1490+
handler: async ({ body, adminUser, tr, cookies, response, headers }) => {
14911491
const { resourceId, actionId, recordId, extra } = body;
14921492
const resource = this.adminforth.config.resources.find((res) => res.resourceId == resourceId);
14931493
if (!resource) {
@@ -1519,7 +1519,8 @@ export default class AdminForthRestAPI implements IAdminForthRestAPI {
15191519
redirectUrl: action.url
15201520
}
15211521
}
1522-
const actionResponse = await action.action({ recordId, adminUser, resource, tr, adminforth: this.adminforth, response, extra: {...extra, cookies: cookies} });
1522+
1523+
const actionResponse = await action.action({ recordId, adminUser, resource, tr, adminforth: this.adminforth, response, extra: {...extra, cookies: cookies, headers: headers} });
15231524

15241525
return {
15251526
actionId,

0 commit comments

Comments
 (0)