Skip to content

Commit

Permalink
Pass schema from validateUrl() to validate() (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
zerberio committed Jun 17, 2015
1 parent d4e4600 commit 812e30e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand All @@ -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) });
}
});
}
Expand Down

0 comments on commit 812e30e

Please sign in to comment.