Merge remote-tracking branch 'tower/release_3.2.2' into devel

This commit is contained in:
Matthew Jones
2017-12-13 12:25:47 -05:00
144 changed files with 9292 additions and 9012 deletions
+10 -3
View File
@@ -62,13 +62,20 @@ function requestWithCache (config) {
* @yields {boolean} - Indicating a match has been found. If so, the results
* are set on the model.
*/
function search (params, config) {
function search (params = {}, config = {}) {
const req = {
method: 'GET',
url: this.path,
params
url: this.path
};
if (typeof params === 'string') {
req.url = `?params`;
} else if (Array.isArray(params)) {
req.url += `?${params.join('&')}`;
} else {
req.params = params;
}
return $http(req)
.then(({ data }) => {
if (!data.count) {