REDROOM
PHP 8.2.30
Path:
Logout
Edit File
Size: 1.35 KB
Close
//proc/thread-self/root/home/byroehnu/.trash/node_modules11/adminjs/lib/frontend/interfaces/action/call-action-api.js
Text
Base64
import { ApiClient } from '../../utils/index.js'; const api = new ApiClient(); export function callActionApi(action, params, search) { let promise; const { recordId, recordIds, resourceId } = params; /* Temporary workaround to avoid breaking changes. TODO: For v8 release, rewrite actions to support PUT & DELETE methods. Actions should have an option to configure a default method for action buttons. */ let method = 'get'; if (action.name === 'delete') { method = 'post'; } switch (action.actionType) { case 'record': if (!recordId) { throw new Error('You have to specify "recordId" for record action'); } promise = api.recordAction({ resourceId, actionName: action.name, recordId, search, method }); break; case 'resource': promise = api.resourceAction({ resourceId, actionName: action.name, method }); break; case 'bulk': if (!recordIds) { throw new Error('You have to specify "recordIds" for bulk action'); } promise = api.bulkAction({ resourceId, actionName: action.name, recordIds, search, method }); break; default: throw new Error('"actionType" should be either record, resource or bulk'); } return promise; }
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 0 × Files: 11
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
action-has-component.js
210 B
lrw-r--r--
2026-02-28 00:28:46
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
action-href.js
823 B
lrw-r--r--
2026-02-28 00:28:56
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
action-json.interface.js
10 B
lrw-r--r--
2026-02-28 00:28:58
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
build-action-api-call-trigger.js
444 B
lrw-r--r--
2026-02-28 00:31:22
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
build-action-click-handler.js
2.21 KB
lrw-r--r--
2026-02-28 00:31:22
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
build-action-test-id.js
67 B
lrw-r--r--
2026-02-28 00:31:22
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
call-action-api.js
1.35 KB
lrw-r--r--
2026-02-28 00:31:26
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
index.js
419 B
lrw-r--r--
2026-02-28 00:31:44
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
is-bulk-action.js
102 B
lrw-r--r--
2026-02-28 00:31:44
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
is-record-action.js
105 B
lrw-r--r--
2026-02-28 00:31:44
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
is-resource-action.js
110 B
lrw-r--r--
2026-02-28 00:31:44
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).