[typescript-fetch] fix access token type (#3323)

This commit is contained in:
hello-brsd 2019-07-15 08:03:09 +02:00 committed by Esteban Gehring
parent 2fbf0f33b3
commit 81e073df2c

View File

@ -113,8 +113,8 @@ export class {{classname}} extends runtime.BaseAPI {
}
{{/isBasicBasic}}
{{#isBasicBearer}}
if (this.configuration && (this.configuration.accessToken || this.configuration.apiKey)) {
const token = this.configuration.accessToken || this.configuration.apiKey;
if (this.configuration && this.configuration.accessToken) {
const token = this.configuration.accessToken;
const tokenString = typeof token === 'function' ? token("{{name}}", [{{#scopes}}"{{{scope}}}"{{^-last}}, {{/-last}}{{/scopes}}]) : token;
if (tokenString) {