Fix TS errors
This commit is contained in:
parent
ea84af782d
commit
b546512a2f
|
@ -6,7 +6,7 @@ import {
|
|||
GetOfflineLicenseTokenResponse,
|
||||
QuotaUsage,
|
||||
} from "@budibase/types"
|
||||
import { BaseAPIClient } from "./types"
|
||||
import { APIError, BaseAPIClient } from "./types"
|
||||
|
||||
export interface LicensingEndpoints {
|
||||
activateLicenseKey: (licenseKey: string) => Promise<void>
|
||||
|
@ -40,7 +40,7 @@ export const buildLicensingEndpoints = (
|
|||
return await API.get({
|
||||
url: "/api/global/license/key",
|
||||
})
|
||||
} catch (e) {
|
||||
} catch (e: any) {
|
||||
if (e.status !== 404) {
|
||||
throw e
|
||||
}
|
||||
|
@ -66,7 +66,7 @@ export const buildLicensingEndpoints = (
|
|||
return await API.get({
|
||||
url: "/api/global/license/offline",
|
||||
})
|
||||
} catch (e) {
|
||||
} catch (e: any) {
|
||||
if (e.status !== 404) {
|
||||
throw e
|
||||
}
|
||||
|
|
|
@ -85,10 +85,10 @@ export type BaseAPIClient = {
|
|||
|
||||
export type APIError = {
|
||||
message?: string
|
||||
url?: string
|
||||
method?: HTTPMethod
|
||||
json: any
|
||||
status: number
|
||||
url: string
|
||||
method: HTTPMethod
|
||||
handled: boolean
|
||||
suppressErrors: boolean
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue