Skip to content

Commit 0e97327

Browse files
committed
lint
1 parent 87fed0a commit 0e97327

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

src/utils/api.ts

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -79,12 +79,17 @@ export function getDefaultApiBaseUrl(): string | undefined {
7979
export 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
}

0 commit comments

Comments
 (0)