Skip to content

getCRUDForTo ​

Overview ​

Get the route configuration for a CRUD operation.

Signature ​

getCRUDForTo(params)

Parameters ​

NameTypeRequiredDescription
paramsobjectyesThe parameters.

params Properties ​

NameTypeRequiredDefaultDescription
appstringThe app name.
modelstringThe model name.
pkstring | string[]One primary key, which targets the detail route, or an array of keys, which targets the list route with one repeated pk query value per key. An empty array is no selection.
queryanyOther query values for the target. Pass keys through pk; a pk entry here throws.
viewstringThe view name.

Returns ​

Promise

The route configuration.

Throws ​

  • When query has a pk entry.

Source ​

client/lib/router/getCrud.js:28