Skip to content

Commit

Permalink
merge
Browse files Browse the repository at this point in the history
  • Loading branch information
ssebro committed Jul 6, 2018
2 parents bf5de96 + 7af5ee3 commit 044a36c
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions lib/harvester.js
Original file line number Diff line number Diff line change
Expand Up @@ -535,6 +535,22 @@ Harvester.prototype.restricted = function(name) {
return this;
};

/**
* Mark a resource as restricted, which destroys all routes on that resource. The resource
* can still be modified using adapter methods.
*
* @param {String} [name] if no name is passed, the last defined resource is used.
* @return {this}
*/
Harvester.prototype.restricted = function (name) {
if (typeof name !== 'string') {
name = this._resource;
}

this.createdResources[name].restricted();
return this;
};

/**
* Mark a resource as immutable, which destroys the routes
* for `PUT`, `PATCH`, and `DELETE` on that resource. The resource
Expand Down

0 comments on commit 044a36c

Please sign in to comment.