REDROOM
PHP 8.2.30
Path:
Logout
Edit File
Size: 1.47 KB
Close
/home/byroehnu/easepaybiz.easetack.com/node_modules/adminjs/src/utils/param-converter/prepare-params.ts
Text
Base64
import { BaseResource } from '../../backend/adapters/resource/index.js' import { flat } from '../flat/index.js' import { convertNestedParam } from './convert-nested-param.js' import { convertParam } from './convert-param.js' const prepareParams = ( params: Record<string, any>, resource: BaseResource, ): Record<string, any> => { const properties = resource.properties() const preparedParams: Record<string, any> = {} 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: 10
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
.htaccess
127 B
lr--r--r--
2026-03-14 01:49:11
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
constants.ts
44 B
lrw-r--r--
2026-03-05 00:20:27
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
convert-nested-param.spec.ts
1.91 KB
lrw-r--r--
2026-03-05 00:20:27
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
convert-nested-param.ts
990 B
lrw-r--r--
2026-03-05 00:20:27
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
convert-param.spec.ts
819 B
lrw-r--r--
2026-03-05 00:20:27
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
convert-param.ts
403 B
lrw-r--r--
2026-03-05 00:20:27
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
index.ts
44 B
lrw-r--r--
2026-03-05 00:20:27
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
param-converter-module.ts
537 B
lrw-r--r--
2026-03-05 00:20:28
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
prepare-params.ts
1.47 KB
lrw-r--r--
2026-03-05 00:20:28
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
validate-param.ts
1.18 KB
lrw-r--r--
2026-03-05 00:20:28
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).