Skip to content

Commit

Permalink
refactor: renterd remove deprecated hosts API
Browse files Browse the repository at this point in the history
  • Loading branch information
alexfreska committed Aug 27, 2024
1 parent 3fc5db6 commit cfd36f0
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 15 deletions.
7 changes: 7 additions & 0 deletions .changeset/short-lizards-shop.md
Original file line number Diff line number Diff line change
@@ -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
6 changes: 0 additions & 6 deletions libs/renterd-js/src/bus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,6 @@ import {
busHostsAllowlistRoute,
busHostsBlocklistRoute,
busHostsHostKeyRoute,
busHostsRoute,
busMetricChurnRoute,
busMetricContractRoute,
busMetricContractsetRoute,
Expand Down Expand Up @@ -383,11 +382,6 @@ export function Bus({ api, password }: { api: string; password?: string }) {
WalletPendingPayload,
WalletPendingResponse
>(axios, 'get', busWalletPendingRoute),
hosts: buildRequestHandler<HostsParams, HostsPayload, HostsResponse>(
axios,
'get',
busHostsRoute
),
hostsSearch: buildRequestHandler<
HostsSearchParams,
HostsSearchPayload,
Expand Down
8 changes: 0 additions & 8 deletions libs/renterd-react/src/bus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,6 @@ import {
busHostsAllowlistRoute,
busHostsBlocklistRoute,
busHostsHostKeyRoute,
busHostsRoute,
busObjectsRoute,
busObjectsKeyRoute,
busObjectsListRoute,
Expand Down Expand Up @@ -486,13 +485,6 @@ export function useWalletPending(
return useGetSwr({ ...args, route: busWalletPendingRoute })
}

export function useHosts(args: HookArgsSwr<HostsParams, HostsResponse>) {
return useGetSwr({
...args,
route: busHostsRoute,
})
}

export function useHostsSearch(
args: HookArgsWithPayloadSwr<
HostsSearchParams,
Expand Down
1 change: 0 additions & 1 deletion libs/renterd-types/src/bus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit cfd36f0

Please sign in to comment.