Skip to content

Commit

Permalink
adding warning about overiting dupe methods
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonkneen committed Dec 3, 2018
1 parent 116ed87 commit e483835
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions reste.js
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,11 @@ var main = function() {
reste.addMethod = function(args) {
log(args.requestHeaders);

if (reste[args.name]) {
throw "RESTe :: method already defined and will be overwritten: " +
args.name;
}

reste[args.name] = function(params, onLoad, onError) {
var body,
method = "GET",
Expand Down

0 comments on commit e483835

Please sign in to comment.