ng2-wp-api
Advanced tools
Comparing version 1.0.11 to 1.1.0
{ | ||
"name": "ng2-wp-api", | ||
"version": "1.0.11", | ||
"version": "1.1.0", | ||
"description": "WordPress API Service for Angular2", | ||
@@ -5,0 +5,0 @@ "main": "./index.js", |
@@ -110,3 +110,3 @@ "use strict"; | ||
this.get = (id, args) => { | ||
return this.http.get(this.state.generateUrl(this.endpoint, args), this.state.getOptions()).map(res => res.json()); | ||
return this.http.get(this.state.generateUrl(this.endpoint + id, args), this.state.getOptions()).map(res => res.json()); | ||
}; | ||
@@ -117,6 +117,6 @@ this.add = (body) => { | ||
this.update = (id, body) => { | ||
return this.http.put(this.state.generateUrl(this.endpoint) + id, body, this.state.getOptions()).map(res => res.json()); | ||
return this.http.put(this.state.generateUrl(this.endpoint + id), body, this.state.getOptions()).map(res => res.json()); | ||
}; | ||
this.delete = (id) => { | ||
return this.http.delete(this.endpoint + id + "?force=true", this.state.getOptions()).map(res => res.json()); | ||
return this.http.delete(this.state.generateUrl(this.endpoint + id + "?force=true"), this.state.getOptions()).map(res => res.json()); | ||
}; | ||
@@ -123,0 +123,0 @@ } |
@@ -114,3 +114,3 @@ import {Injectable} from '@angular/core'; | ||
return this.http.get( | ||
this.state.generateUrl(this.endpoint, args), | ||
this.state.generateUrl(this.endpoint + id, args), | ||
this.state.getOptions()).map(res => res.json()); | ||
@@ -130,3 +130,3 @@ } | ||
return this.http.put( | ||
this.state.generateUrl(this.endpoint) + id, | ||
this.state.generateUrl(this.endpoint + id), | ||
body, | ||
@@ -139,3 +139,3 @@ this.state.getOptions()).map(res => res.json()); | ||
return this.http.delete( | ||
this.endpoint + id + "?force=true", | ||
this.state.generateUrl(this.endpoint + id + "?force=true"), | ||
this.state.getOptions()).map(res => res.json()); | ||
@@ -142,0 +142,0 @@ } |
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
504569
1