Function handlers for CRUD operations.
To use these handlers, import them and call them with the appropriate parameters like this:
const { importModule } = this.app.bajo
const listHandler = await importModule('waibuDb:/lib/crud/list-handler.js')
...
- Source
Methods
(async, static) listHandler(opts) → {Promise.<string>}
Handle the list view for a given model, rendering the appropriate template with the retrieved data.
Parameters:
| Name | Type | Description | |||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
opts | object | Options object Properties
|
- Source
Returns:
Renders the list view
- Type:
- Promise.<string>