J.P. Poveda
J.P. Poveda
``` @Route({ method: 'get', path: ':id' }) async getById(req, res, next) { if(req.params.id === 'suggestions') { return; } } @Route({ method: 'get', path: '/suggestions' }) async getById(req, res, next) {...
``` @Db() @Json({ encrypt: 'array', type: 'id' }) locationIds: LocationId[] = []; ``` If true, assume the entire property should be encrypted, otherwise, encrypt individual elements within the array such...
`- Error: Model 'Area' has a property 'imageSmallFileName' that defines its model with a value that cannot be constructed` See also: #160
Part 2 of #177 `@FromJson` needs to be refactored and updated to behave like `@ToJson` so that sub document `@FromJson`s get called. See: https://github.com/sakuraapi/core/blob/develop/src/core/%40model/from-json.spec.ts#L153
https://github.com/sakuraapi/core/blob/develop/src/core/sakura-api.ts#L593 Currently, you have to do this manually by adding a middleware handler.
For example `find`, `aggregate`.. you should be able to just: `model.aggregate([...])` rather than having to `model.getCollection().aggregate([...])`
For example if a model has a property `userId` that's decorated `@Db('uid')`, you have to `model.getOne(uid: 123)` rather than `model.getOne(userId: 123)`.