From e483835c492879739b68241efcca1175c801f2fa Mon Sep 17 00:00:00 2001 From: Jason Kneen Date: Mon, 3 Dec 2018 17:17:25 +0000 Subject: [PATCH] adding warning about overiting dupe methods --- reste.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/reste.js b/reste.js index 6cff3b1..48c4600 100644 --- a/reste.js +++ b/reste.js @@ -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",