File tree Expand file tree Collapse file tree 1 file changed +11
-6
lines changed
Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -79,12 +79,17 @@ export function getDefaultApiBaseUrl(): string | undefined {
7979export async function queryApi ( path : string , apiToken : string ) {
8080 const API_V0_URL = getDefaultApiBaseUrl ( ) || ''
8181 if ( ! API_V0_URL ) {
82- logger . warn ( 'API endpoint is not set and default was empty. Request is likely to fail.' )
82+ logger . warn (
83+ 'API endpoint is not set and default was empty. Request is likely to fail.'
84+ )
8385 }
84- return await fetch ( `${ API_V0_URL } ${ API_V0_URL . endsWith ( '/' ) ?'' :'/' } ${ path } ` , {
85- method : 'GET' ,
86- headers : {
87- Authorization : `Basic ${ btoa ( `${ apiToken } :` ) } `
86+ return await fetch (
87+ `${ API_V0_URL } ${ API_V0_URL . endsWith ( '/' ) ? '' : '/' } ${ path } ` ,
88+ {
89+ method : 'GET' ,
90+ headers : {
91+ Authorization : `Basic ${ btoa ( `${ apiToken } :` ) } `
92+ }
8893 }
89- } )
94+ )
9095}
You can’t perform that action at this time.
0 commit comments