Skip to content

Commit

Permalink
hasFetcher -> isRegistered
Browse files Browse the repository at this point in the history
  • Loading branch information
Vijar committed Jun 16, 2015
1 parent ebdfe5a commit 097c239
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions libs/fetcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,12 @@ function parseParamValues (params) {
};

/**
* @method hasFetcher
* @method isRegistered
* @memberof Fetcher
* @param {String} name
* @returns {Boolean} true if fetcher with name was registered
*/
Fetcher.hasFetcher = function (name) {
Fetcher.isRegistered = function (name) {
return name && Fetcher.fetchers[name];
};

Expand All @@ -108,7 +108,7 @@ function parseParamValues (params) {
var path = req.path.substr(1).split(';');
var resource = path.shift();

if (!Fetcher.hasFetcher(resource)) {
if (!Fetcher.isRegistered(resource)) {
error = fumble.http.badRequest('Invalid Fetchr Access', {
debug: 'Bad resource ' + resource
});
Expand Down Expand Up @@ -150,7 +150,7 @@ function parseParamValues (params) {
var DEFAULT_GUID = 'g0';
var singleRequest = requests[DEFAULT_GUID];

if (!Fetcher.hasFetcher(singleRequest.resource)) {
if (!Fetcher.isRegistered(singleRequest.resource)) {
error = fumble.http.badRequest('Invalid Fetchr Access', {
debug: 'Bad resource ' + singleRequest.resource
});
Expand Down

0 comments on commit 097c239

Please sign in to comment.