From 8327173b30e76b5409c2d4a9513e1adc917e9a9f Mon Sep 17 00:00:00 2001 From: andrew-aladev Date: Tue, 9 Aug 2016 11:17:24 +0300 Subject: [PATCH] renamed cuttedPath to cutPath --- lib/index.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/index.js b/lib/index.js index fe2be3a..f16ac5a 100644 --- a/lib/index.js +++ b/lib/index.js @@ -115,13 +115,13 @@ Salti.prototype.handler = function (request, response, nextHandler) { // Next section deals with // /{:db}/{:id}, /{:db}/_local/{:id} and /{:db}/{:id}/attachment stuff. - var cuttedPath = this.getPathWithoutPrefix(); - if (!cuttedPath) { + var cutPath = this.getPathWithoutPrefix(); + if (!cutPath) { // Required DB Prefix is not valid. return this.unauthorized(3); } - var pathParts = cuttedPath.split('/'); + var pathParts = cutPath.split('/'); if (pathParts[0] !== '') { // Sanity check, the first element should always be empty. return this.unauthorized(4); @@ -141,7 +141,7 @@ Salti.prototype.handler = function (request, response, nextHandler) { else if (pathParts.length === 3 && pathParts[1] === '_local') { // Is this a thali {:id}? - var isThaliPrefix = cuttedPath.startsWith(Salti.THALI_PREFIX); + var isThaliPrefix = cutPath.startsWith(Salti.THALI_PREFIX); if (isThaliPrefix) { // Is /_local/thali_{:id} authorized? lookupPath = this.dbPrefix + Salti.THALI_PREFIX + @@ -150,7 +150,7 @@ Salti.prototype.handler = function (request, response, nextHandler) { debug('unauthorized thali prefix'); return this.unauthorized(6); } - var thaliId = cuttedPath.substring(Salti.THALI_PREFIX.length); + var thaliId = cutPath.substring(Salti.THALI_PREFIX.length); if (!this.resolveThaliId(thaliId)) { debug('unauthorized thali id'); return this.unauthorized(7);