From cfd36f0374072825777f451b7b156e69d1f54120 Mon Sep 17 00:00:00 2001 From: Alex Freska Date: Tue, 27 Aug 2024 11:26:48 -0400 Subject: [PATCH] refactor: renterd remove deprecated hosts API --- .changeset/short-lizards-shop.md | 7 +++++++ libs/renterd-js/src/bus.ts | 6 ------ libs/renterd-react/src/bus.ts | 8 -------- libs/renterd-types/src/bus.ts | 1 - 4 files changed, 7 insertions(+), 15 deletions(-) create mode 100644 .changeset/short-lizards-shop.md diff --git a/.changeset/short-lizards-shop.md b/.changeset/short-lizards-shop.md new file mode 100644 index 000000000..e590a79a2 --- /dev/null +++ b/.changeset/short-lizards-shop.md @@ -0,0 +1,7 @@ +--- +'@siafoundation/renterd-js': minor +'@siafoundation/renterd-react': minor +'@siafoundation/renterd-types': minor +--- + +Remove deprecated hosts API. Relates to https://github.com/SiaFoundation/renterd/pull/1484 diff --git a/libs/renterd-js/src/bus.ts b/libs/renterd-js/src/bus.ts index 56d4ee62c..d49b718ab 100644 --- a/libs/renterd-js/src/bus.ts +++ b/libs/renterd-js/src/bus.ts @@ -238,7 +238,6 @@ import { busHostsAllowlistRoute, busHostsBlocklistRoute, busHostsHostKeyRoute, - busHostsRoute, busMetricChurnRoute, busMetricContractRoute, busMetricContractsetRoute, @@ -383,11 +382,6 @@ export function Bus({ api, password }: { api: string; password?: string }) { WalletPendingPayload, WalletPendingResponse >(axios, 'get', busWalletPendingRoute), - hosts: buildRequestHandler( - axios, - 'get', - busHostsRoute - ), hostsSearch: buildRequestHandler< HostsSearchParams, HostsSearchPayload, diff --git a/libs/renterd-react/src/bus.ts b/libs/renterd-react/src/bus.ts index afb30efbe..c1b9f1109 100644 --- a/libs/renterd-react/src/bus.ts +++ b/libs/renterd-react/src/bus.ts @@ -208,7 +208,6 @@ import { busHostsAllowlistRoute, busHostsBlocklistRoute, busHostsHostKeyRoute, - busHostsRoute, busObjectsRoute, busObjectsKeyRoute, busObjectsListRoute, @@ -486,13 +485,6 @@ export function useWalletPending( return useGetSwr({ ...args, route: busWalletPendingRoute }) } -export function useHosts(args: HookArgsSwr) { - return useGetSwr({ - ...args, - route: busHostsRoute, - }) -} - export function useHostsSearch( args: HookArgsWithPayloadSwr< HostsSearchParams, diff --git a/libs/renterd-types/src/bus.ts b/libs/renterd-types/src/bus.ts index 6be60cb47..9179213aa 100644 --- a/libs/renterd-types/src/bus.ts +++ b/libs/renterd-types/src/bus.ts @@ -41,7 +41,6 @@ export const busWalletDiscardRoute = '/bus/wallet/discard' export const busWalletPrepareFormRoute = '/bus/wallet/prepare/form' export const busWalletPrepareRenewRoute = '/bus/wallet/prepare/renew' export const busWalletPendingRoute = '/bus/wallet/pending' -export const busHostsRoute = '/bus/hosts' export const busSearchHostsRoute = '/bus/search/hosts' export const busHostHostKeyRoute = '/bus/host/:hostKey' export const busHostsHostKeyRoute = '/bus/hosts/:hostKey'