From 812e30e3513ffe8ef7caa9ddace8d1399f106290 Mon Sep 17 00:00:00 2001 From: nide Date: Wed, 17 Jun 2015 11:26:19 +0300 Subject: [PATCH] Pass schema from validateUrl() to validate() (#6) --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 742bf14..135ea60 100644 --- a/index.js +++ b/index.js @@ -83,7 +83,7 @@ exports.validate = function(raw, schema) { }); } -exports.validateUrl = function(dpurl, callback) { +exports.validateUrl = function(dpurl, callback, schema) { request(dpurl, function(err, response, body) { if (err) { callback({ @@ -101,7 +101,7 @@ exports.validateUrl = function(dpurl, callback) { }] }); } else { - exports.validate(body).then(function(O) { callback(O) }); + exports.validate(body, schema).then(function(O) { callback(O) }); } }); }