mirror of
https://github.com/KevinMidboe/moviedb.git
synced 2025-10-29 17:50:25 +00:00
allow no params
This commit is contained in:
@@ -23,6 +23,11 @@ Object.keys(methods).forEach(function(method){
|
|||||||
|
|
||||||
var that = this;
|
var that = this;
|
||||||
|
|
||||||
|
if("function" == typeof params) {
|
||||||
|
fn = params;
|
||||||
|
params = {};
|
||||||
|
}
|
||||||
|
|
||||||
if(!this.token || Date.now() > +new Date(this.token.expires_at)) {
|
if(!this.token || Date.now() > +new Date(this.token.expires_at)) {
|
||||||
|
|
||||||
this.requestToken(function(){
|
this.requestToken(function(){
|
||||||
@@ -46,6 +51,11 @@ Object.keys(methods).forEach(function(method){
|
|||||||
|
|
||||||
var that = this;
|
var that = this;
|
||||||
|
|
||||||
|
if("function" == typeof params) {
|
||||||
|
fn = params;
|
||||||
|
params = {};
|
||||||
|
}
|
||||||
|
|
||||||
if(!this.token || Date.now() > +new Date(this.token.expires_at)) {
|
if(!this.token || Date.now() > +new Date(this.token.expires_at)) {
|
||||||
|
|
||||||
this.requestToken(function(){
|
this.requestToken(function(){
|
||||||
|
|||||||
Reference in New Issue
Block a user