mirror of
https://github.com/KevinMidboe/moviedb.git
synced 2025-10-29 17:50:25 +00:00
Release 0.1.7
This commit is contained in:
@@ -40,6 +40,8 @@ MovieDB.prototype.requestToken = function(fn){
|
||||
if(res.ok) self.token = res.body;
|
||||
else throw res.error;
|
||||
fn();
|
||||
}).on('error', function(){
|
||||
throw res.error;
|
||||
});
|
||||
|
||||
return this;
|
||||
@@ -91,4 +93,6 @@ var execMethod = function(type, params, endpoint, fn){
|
||||
if(res.ok) fn(null, res.body);
|
||||
else fn(res.error, null);
|
||||
});
|
||||
|
||||
req.on('error', fn);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user