Merge pull request #135 from albertoleal/ConvertNullToNotFoundError
ConvertNulltoNotFoundError when calling DataAccessObject.findOne via rest
This commit is contained in:
commit
26501eaa2e
|
@ -767,7 +767,8 @@ setRemoting(DataAccessObject.findOne, {
|
|||
description: 'Find first instance of the model matched by filter from the data source',
|
||||
accepts: {arg: 'filter', type: 'object', description: 'Filter defining fields, where, orderBy, offset, and limit'},
|
||||
returns: {arg: 'data', type: 'object', root: true},
|
||||
http: {verb: 'get', path: '/findOne'}
|
||||
http: {verb: 'get', path: '/findOne'},
|
||||
rest: {after: convertNullToNotFoundError}
|
||||
});
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue