diff --git a/lib/dao.js b/lib/dao.js index 0eb7da46..3a4ebfed 100644 --- a/lib/dao.js +++ b/lib/dao.js @@ -298,7 +298,8 @@ DataAccessObject.exists = function exists(id, cb) { // exists ~ remoting attributes setRemoting(DataAccessObject.exists, { description: 'Check whether a model instance exists in the data source', - accepts: {arg: 'id', type: 'any', description: 'Model id', required: true}, + accepts: {arg: 'id', type: 'any', description: 'Model id', required: true, + http: {source: 'path'}}, returns: {arg: 'exists', type: 'any'}, http: {verb: 'get', path: '/:id/exists'} }); @@ -328,7 +329,8 @@ DataAccessObject.findById = function find(id, cb) { // find ~ remoting attributes setRemoting(DataAccessObject.findById, { description: 'Find a model instance by id from the data source', - accepts: {arg: 'id', type: 'any', description: 'Model id', required: true}, + accepts: {arg: 'id', type: 'any', description: 'Model id', required: true, + http: {source: 'path'}}, returns: {arg: 'data', type: 'any', root: true}, http: {verb: 'get', path: '/:id'}, rest: {after: convertNullToNotFoundError} @@ -674,7 +676,8 @@ DataAccessObject.removeById = // deleteById ~ remoting attributes setRemoting(DataAccessObject.deleteById, { description: 'Delete a model instance by id from the data source', - accepts: {arg: 'id', type: 'any', description: 'Model id', required: true}, + accepts: {arg: 'id', type: 'any', description: 'Model id', required: true, + http: {source: 'path'}}, http: {verb: 'del', path: '/:id'} });