File tree Expand file tree Collapse file tree 4 files changed +41
-0
lines changed
Expand file tree Collapse file tree 4 files changed +41
-0
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ ' @siafoundation/indexd-react ' : minor
3+ ' @siafoundation/indexd-types ' : minor
4+ ' @siafoundation/indexd-js ' : minor
5+ ---
6+
7+ Added reset lost sectors API.
Original file line number Diff line number Diff line change @@ -101,6 +101,10 @@ import {
101101 AdminHostScanPayload ,
102102 AdminHostScanResponse ,
103103 adminHostScanRoute ,
104+ AdminHostResetLostSectorsParams ,
105+ AdminHostResetLostSectorsPayload ,
106+ AdminHostResetLostSectorsResponse ,
107+ adminHostResetLostSectorsRoute ,
104108 AdminConnectKeysParams ,
105109 AdminConnectKeysPayload ,
106110 AdminConnectKeysResponse ,
@@ -256,6 +260,11 @@ export function Admin({
256260 AdminHostScanPayload ,
257261 AdminHostScanResponse
258262 > ( axios , 'post' , adminHostScanRoute ) ,
263+ hostResetLostSectors : buildRequestHandler <
264+ AdminHostResetLostSectorsParams ,
265+ AdminHostResetLostSectorsPayload ,
266+ AdminHostResetLostSectorsResponse
267+ > ( axios , 'post' , adminHostResetLostSectorsRoute ) ,
259268 hosts : buildRequestHandler <
260269 AdminHostsParams ,
261270 AdminHostsPayload ,
Original file line number Diff line number Diff line change @@ -94,6 +94,10 @@ import {
9494 AdminHostScanPayload ,
9595 AdminHostScanResponse ,
9696 adminHostScanRoute ,
97+ AdminHostResetLostSectorsParams ,
98+ AdminHostResetLostSectorsPayload ,
99+ AdminHostResetLostSectorsResponse ,
100+ adminHostResetLostSectorsRoute ,
97101 adminConnectKeysRoute ,
98102 AdminConnectKeysParams ,
99103 AdminConnectKeysResponse ,
@@ -334,6 +338,19 @@ export function useAdminHostScan(
334338 } )
335339}
336340
341+ export function useAdminHostResetLostSectors (
342+ args ?: HookArgsCallback <
343+ AdminHostResetLostSectorsParams ,
344+ AdminHostResetLostSectorsPayload ,
345+ AdminHostResetLostSectorsResponse
346+ > ,
347+ ) {
348+ return usePostFunc ( {
349+ ...args ,
350+ route : adminHostResetLostSectorsRoute ,
351+ } )
352+ }
353+
337354export function useAdminHosts (
338355 args ?: HookArgsSwr < AdminHostsParams , AdminHostsResponse > ,
339356) {
Original file line number Diff line number Diff line change @@ -175,6 +175,14 @@ export type AdminHostScanParams = {
175175export type AdminHostScanPayload = void
176176export type AdminHostScanResponse = Host
177177
178+ export const adminHostResetLostSectorsRoute =
179+ '/host/:hostkey/lostsectors/reset'
180+ export type AdminHostResetLostSectorsParams = {
181+ hostkey : PublicKey
182+ }
183+ export type AdminHostResetLostSectorsPayload = void
184+ export type AdminHostResetLostSectorsResponse = void
185+
178186export const adminHostsRoute = '/hosts'
179187export type AdminHostsSortBy =
180188 | 'recentUptime'
You can’t perform that action at this time.
0 commit comments