new Controller(options)
Parameters:
| Name | Type | Description |
|---|---|---|
options |
Object | Object containing the properties listed below |
Properties:
| Name | Type | Description |
|---|---|---|
model |
String | Reference to a name of a model, if specified and valid, this.controller will contain the model instance. |
Methods
-
list(req) → {Promise.<Object>}
-
Returns a list of all models, if a (valid) model is defined, if not, throws an Error. Returns the models on the collection property on the resolved object.
Parameters:
Name Type Description reqControllerRequest Returns:
- Type
- Promise.<Object>