feathers-solr
Advanced tools
Comparing version 1.1.12 to 1.1.13
@@ -263,7 +263,8 @@ 'use strict'; | ||
key: 'patch', | ||
value: function patch(id, data, query) { | ||
value: function patch(id, data, params) { | ||
var _self = this; | ||
return new Promise(function (resolve, reject) { | ||
if (id === null && (!_utils._.isObject(query) || _utils._.isEmpty(query))) { | ||
if (id === null && (!_utils._.isObject(params) || _utils._.isEmpty(params))) { | ||
return reject(new _feathersErrors2.default.BadRequest('Missing Params')); | ||
@@ -281,3 +282,4 @@ } | ||
}); | ||
} else if (_utils._.isObject(query) && !_utils._.isEmpty(query)) { | ||
} else { | ||
var query = params.query || {}; | ||
query.$select = [_self.options.idfield]; | ||
@@ -304,4 +306,2 @@ _self.Solr.json((0, _utils.queryJson)({ query: query }, _self.options)).then(function (response) { | ||
}); | ||
} else { | ||
return reject(new _feathersErrors2.default.BadRequest('Missing Params')); | ||
} | ||
@@ -308,0 +308,0 @@ }); |
@@ -28,3 +28,3 @@ 'use strict'; | ||
filter: [], | ||
sort: '', | ||
// sort: '', | ||
fields: _.get(opt, 'query.$select') || '*,score', // TODO: score | ||
@@ -31,0 +31,0 @@ limit: _.get(opt, 'paginate.default') || _.get(opt, 'paginate.max') || 10, |
{ | ||
"name": "feathers-solr", | ||
"description": "Solr Adapter for Feathersjs", | ||
"version": "1.1.12", | ||
"version": "1.1.13", | ||
"homepage": "https://github.com/sajov/feathers-solr", | ||
@@ -6,0 +6,0 @@ "main": "lib/", |
141458
3376