bugfix api

This commit is contained in:
AJ ONeal 2017-02-27 18:21:35 -07:00
parent d261284acf
commit 1e0d129b8a
1 changed files with 2 additions and 2 deletions

View File

@ -969,7 +969,7 @@
}
, api: function (providerUri, opts) {
if (!OAUTH3.api[opts.api]) {
throw new Error("No API for '" + providerUri + "'");
return OAUTH3.PromiseA.reject(new Error("No API for '" + providerUri + "'"));
}
return OAUTH3.api[opts.api](providerUri, opts);
@ -1073,7 +1073,7 @@
opts = opts || {};
opts.api = api;
opts.session = OAUTH3.hooks.session._getCached(this._providerUri);
OAUTH3.api(this._providerUri, opts);
return OAUTH3.api(this._providerUri, opts);
}
};
result.authenticate = result.login;