Permalink
Browse files

feat(rest): allow criteria as object for update and destroy

  • Loading branch information...
doktordirk committed Feb 1, 2016
1 parent aa0bf4d commit 2738f8cac6386f4f985f3fee7dee33d39f1c5d1d
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/rest.js
@@ -95,7 +95,7 @@ export class Rest {
let requestPath = resource;

if (criteria) {
requestPath += `/${criteria}`;
requestPath += typeof criteria !== 'object' ? `/${criteria}` : '?' + qs.stringify(criteria);
}

return this.request('put', requestPath, body, options);
@@ -114,7 +114,7 @@ export class Rest {
let requestPath = resource;

if (criteria) {
requestPath += `/${criteria}`;
requestPath += typeof criteria !== 'object' ? `/${criteria}` : '?' + qs.stringify(criteria);
}

return this.request('delete', requestPath, undefined, options);

0 comments on commit 2738f8c

Please sign in to comment.