Merge pull request #135 from albertoleal/ConvertNullToNotFoundError

ConvertNulltoNotFoundError when calling DataAccessObject.findOne via rest
This commit is contained in:
Raymond Feng 2014-06-18 23:00:30 -07:00
commit 26501eaa2e
1 changed files with 12 additions and 11 deletions

View File

@ -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}
});
/**