Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
Comment.prototype.update = function (query, body, fn) {
if ('function' === typeof body) {
fn = body;
body = query;
query = {};
}
body = 'string' === typeof body ? { content: body } : body;
var path = '/sites/' + this._sid + '/comments/' + this._cid;
return request.put(this.wpcom, null, path, query, body, fn);
};
Media.prototype.update = function (query, body, fn) {
var path = '/sites/' + this._sid + '/media/' + this._id;
return request.put(this.wpcom, def, path, query, body, fn);
};
Follow.prototype.add = function (query, fn) {
var path = '/sites/' + this._sid + '/follows/new';
return request.put(this.wpcom, null, path, query, null, fn);
};
Post.prototype.update = function (query, body, fn) {
var path = '/sites/' + this._sid + '/posts/' + this._id;
return request.put(this.wpcom, null, path, query, body, fn);
};