@@ -333,8 +333,8 @@ export class Api<SecurityDataType> {
333
333
334
334
private addQueryParams ( query ?: RequestQueryParamsType ) : string {
335
335
const fixedQuery = query || { } ;
336
- const keys = Object . keys ( fixedQuery ) . filter ( key => "undefined" !== typeof fixedQuery [ key ] ) ;
337
- return keys . length === 0 ? "" : `?${ keys . map ( key => this . addQueryParam ( fixedQuery , key ) ) . join ( "&" ) } ` ;
336
+ const keys = Object . keys ( fixedQuery ) . filter ( ( key ) => "undefined" !== typeof fixedQuery [ key ] ) ;
337
+ return keys . length === 0 ? "" : `?${ keys . map ( ( key ) => this . addQueryParam ( fixedQuery , key ) ) . join ( "&" ) } ` ;
338
338
}
339
339
340
340
private mergeRequestOptions ( params : RequestParams , securityParams ?: RequestParams ) : RequestParams {
@@ -353,8 +353,8 @@ export class Api<SecurityDataType> {
353
353
private safeParseResponse = < T = any , E = any > ( response : Response ) : Promise < T > =>
354
354
response
355
355
. json ( )
356
- . then ( data => data )
357
- . catch ( e => response . text ) ;
356
+ . then ( ( data ) => data )
357
+ . catch ( ( e ) => response . text ) ;
358
358
359
359
public request = < T = any , E = any > (
360
360
path : string ,
@@ -368,7 +368,7 @@ export class Api<SecurityDataType> {
368
368
...this . mergeRequestOptions ( params , ( secureByDefault || secure ) && this . securityWorker ( this . securityData ) ) ,
369
369
method,
370
370
body : body ? JSON . stringify ( body ) : null ,
371
- } ) . then ( async response => {
371
+ } ) . then ( async ( response ) => {
372
372
const data = await this . safeParseResponse < T , E > ( response ) ;
373
373
if ( ! response . ok ) throw data ;
374
374
return data ;
0 commit comments