From 3aa607da5e4cd519615f89620ecf905f3d3f633d Mon Sep 17 00:00:00 2001 From: gen4 Date: Mon, 7 Jan 2019 00:31:22 +0300 Subject: [PATCH 1/5] upd --- lib/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/index.js b/lib/index.js index 1b4bf38..09132f3 100644 --- a/lib/index.js +++ b/lib/index.js @@ -50,7 +50,8 @@ module.exports.validationPlugin = function (options) { options.validatorModels = _.extend.apply(null, validatorModels); } return function (req, res, next) { - var validationModel = req.route ? req.route.validation : undefined; + console.log('++'); + var validationModel = (req.route && req.route.spec) ? req.route.spec.validation : undefined; if (validationModel) { // validate From 44c1ab45a664857ee383f81d4e2799d524a1846f Mon Sep 17 00:00:00 2001 From: gen4 Date: Mon, 7 Jan 2019 00:33:03 +0300 Subject: [PATCH 2/5] vers --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index fd63771..6ef4092 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "node-restify-validation", - "version": "1.3.0", + "version": "1.3.1", "author": { "name": "Timo Behrmann" }, From 32a2b8f02ccc5cc6470a83ae2bd236f862f5205e Mon Sep 17 00:00:00 2001 From: gen4 Date: Mon, 7 Jan 2019 00:34:47 +0300 Subject: [PATCH 3/5] upd --- package.json | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 6ef4092..595bb97 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "node-restify-validation", + "name": "node-restify-validation-gen4", "version": "1.3.1", "author": { "name": "Timo Behrmann" @@ -16,10 +16,7 @@ "restify", "validation" ], - "repository": { - "type": "git", - "url": "git://github.com/z0mt3c/node-restify-validation.git" - }, + "bugs": { "url": "https://github.com/z0mt3c/node-restify-validation/issues" }, From ac1be10fc24546fbd42d66500fed1cc4bbb4dadf Mon Sep 17 00:00:00 2001 From: gen4 Date: Mon, 7 Jan 2019 00:42:04 +0300 Subject: [PATCH 4/5] upd --- package.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 595bb97..c49fe54 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,10 @@ "restify", "validation" ], - + "repository": { + "type": "git", + "url": "git://github.com/z0mt3c/node-restify-validation.git" + }, "bugs": { "url": "https://github.com/z0mt3c/node-restify-validation/issues" }, From f40eaa492ac02e3c6193fa5196729322bb171a62 Mon Sep 17 00:00:00 2001 From: gen4 Date: Mon, 7 Jan 2019 00:44:18 +0300 Subject: [PATCH 5/5] upd --- lib/index.js | 1 - package.json | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/index.js b/lib/index.js index 09132f3..46a1ea6 100644 --- a/lib/index.js +++ b/lib/index.js @@ -50,7 +50,6 @@ module.exports.validationPlugin = function (options) { options.validatorModels = _.extend.apply(null, validatorModels); } return function (req, res, next) { - console.log('++'); var validationModel = (req.route && req.route.spec) ? req.route.spec.validation : undefined; if (validationModel) { diff --git a/package.json b/package.json index c49fe54..6ef4092 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "node-restify-validation-gen4", + "name": "node-restify-validation", "version": "1.3.1", "author": { "name": "Timo Behrmann"