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/utils/param-converter/prepare-params.js
Text
Base64
import { flat } from '../flat/index.js'; import { convertNestedParam } from './convert-nested-param.js'; import { convertParam } from './convert-param.js'; const prepareParams = (params, resource) => { const properties = resource.properties(); const preparedParams = {}; for (const property of properties) { let param = flat.get(params, property.path()); const key = property.path(); const propertyDecorator = resource._decorated?.properties[key].toJSON(); // eslint-disable-next-line no-continue if (param === undefined || param === null) continue; if (property.type() !== 'mixed') { if (propertyDecorator?.isArray) { preparedParams[key] = param.map(p => convertParam(p, property.type())); } else { preparedParams[key] = convertParam(param, property.type()); } } else { if (param !== null && propertyDecorator?.subProperties.length) { const { subProperties } = propertyDecorator; for (const subProperty of subProperties) { if (propertyDecorator.isArray) { param = param.map(p => convertNestedParam(p, subProperty)); } else { param = convertNestedParam(param, subProperty); } } } preparedParams[key] = param; } } return { ...params, ...preparedParams }; }; export { prepareParams };
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 0 × Files: 9
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
constants.js
44 B
lrw-r--r--
2026-02-28 00:31:26
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
convert-nested-param.js
828 B
lrw-r--r--
2026-02-28 00:31:26
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
convert-nested-param.spec.js
1.88 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
convert-param.js
386 B
lrw-r--r--
2026-02-28 00:31:26
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
convert-param.spec.js
824 B
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
44 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
param-converter-module.js
313 B
lrw-r--r--
2026-02-28 00:31:48
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
prepare-params.js
1.35 KB
lrw-r--r--
2026-02-28 00:31:48
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
validate-param.js
819 B
lrw-r--r--
2026-02-28 00:31:52
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).