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