use v2 endpoint for lbry.tv status
This commit is contained in:
parent
684d0e302c
commit
dcfdbd6352
1 changed files with 5 additions and 1 deletions
|
@ -11,7 +11,11 @@ export const STATUS_DOWN = 'down';
|
|||
|
||||
export function useDegradedPerformance(onDegradedPerformanceCallback) {
|
||||
useEffect(() => {
|
||||
fetchWithTimeout(STATUS_TIMEOUT_LIMIT, fetch(`${SDK_API_PATH}/status`))
|
||||
// The status endpoint is the only endpoint at "v2" currently
|
||||
// This should be moved into the config once more endpoints are using it
|
||||
const STATUS_ENDPOINT = `${SDK_API_PATH}/status`.replace('v1', 'v2');
|
||||
|
||||
fetchWithTimeout(STATUS_TIMEOUT_LIMIT, fetch(STATUS_ENDPOINT))
|
||||
.then(response => response.json())
|
||||
.then(status => {
|
||||
if (status.general_state !== STATUS_OK) {
|
||||
|
|
Loading…
Reference in a new issue