Merge pull request #2729 from strongloop/Fix_data_argument_upsertWithWhere
Fix data argument for upsertWithWhere
This commit is contained in:
commit
73962fb3cc
|
@ -682,7 +682,7 @@ module.exports = function(registry) {
|
|||
accepts: [
|
||||
{ arg: 'where', type: 'object', http: { source: 'query' },
|
||||
description: 'Criteria to match model instances' },
|
||||
{ arg: 'data', type: 'object', http: { source: 'body' },
|
||||
{ arg: 'data', type: 'object', model: typeName, http: { source: 'body' },
|
||||
description: 'An object of model property name/value pairs' },
|
||||
],
|
||||
returns: { arg: 'data', type: typeName, root: true },
|
||||
|
|
|
@ -196,7 +196,7 @@ describe('remoting - integration', function() {
|
|||
var storeClass = findClass('store');
|
||||
var methods = getFormattedMethodsExcludingRelations(storeClass.methods);
|
||||
var expectedMethods = [
|
||||
'upsertWithWhere(where:object,data:object):store POST /stores/upsertWithWhere',
|
||||
'upsertWithWhere(where:object,data:object:store):store POST /stores/upsertWithWhere',
|
||||
];
|
||||
expect(methods).to.include.members(expectedMethods);
|
||||
});
|
||||
|
@ -219,7 +219,7 @@ describe('With model.settings.replaceOnPUT false', function() {
|
|||
'upsert(data:object:storeWithReplaceOnPUTfalse):storeWithReplaceOnPUTfalse PUT /stores-updating',
|
||||
'upsert(data:object:storeWithReplaceOnPUTfalse):storeWithReplaceOnPUTfalse PATCH /stores-updating',
|
||||
'replaceOrCreate(data:object:storeWithReplaceOnPUTfalse):storeWithReplaceOnPUTfalse POST /stores-updating/replaceOrCreate',
|
||||
'upsertWithWhere(where:object,data:object):storeWithReplaceOnPUTfalse POST /stores-updating/upsertWithWhere',
|
||||
'upsertWithWhere(where:object,data:object:storeWithReplaceOnPUTfalse):storeWithReplaceOnPUTfalse POST /stores-updating/upsertWithWhere',
|
||||
'exists(id:any):boolean GET /stores-updating/:id/exists',
|
||||
'exists(id:any):boolean HEAD /stores-updating/:id',
|
||||
'findById(id:any,filter:object):storeWithReplaceOnPUTfalse GET /stores-updating/:id',
|
||||
|
|
Loading…
Reference in New Issue