Fix TS errors

This commit is contained in:
Andrew Kingston 2024-12-03 10:40:00 +00:00
parent ea84af782d
commit b546512a2f
No known key found for this signature in database
2 changed files with 5 additions and 5 deletions

View File

@ -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
} }

View File

@ -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
} }