From dc0b252564289e2ff71eb6937c5bc32f90002f3f Mon Sep 17 00:00:00 2001 From: eL0ck Date: Mon, 26 Sep 2016 15:29:22 +1000 Subject: [PATCH] fixed merge error. Tests all passing --- .../aws/deploy/compile/events/apiGateway/lib/validate.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/plugins/aws/deploy/compile/events/apiGateway/lib/validate.js b/lib/plugins/aws/deploy/compile/events/apiGateway/lib/validate.js index 0bb5621d4..d2e9e9c33 100644 --- a/lib/plugins/aws/deploy/compile/events/apiGateway/lib/validate.js +++ b/lib/plugins/aws/deploy/compile/events/apiGateway/lib/validate.js @@ -43,13 +43,15 @@ module.exports = { throw new this.serverless.classes .Error(errorMessage); } + method = method.toLowerCase(); + const allowedMethods = [ 'get', 'post', 'put', 'patch', 'options', 'head', 'delete', 'any', ]; if (allowedMethods.indexOf(method) === -1) { const errorMessage = [ `Invalid APIG method "${method}" in function "${functionName}".`, - ` AWS supported methods are: ${allowedMethods.join(", ")}.`, + ` AWS supported methods are: ${allowedMethods.join(', ')}.`, ].join(''); throw new this.serverless.classes.Error(errorMessage); }