1
0
mirror of https://gitcode.com/gh_mirrors/re/react-native-pushy.git synced 2025-11-02 06:13:11 +08:00
Code Issues Packages Projects Releases Wiki Activity GitHub Gitee

fix testurl

This commit is contained in:
sunnylqm
2024-11-13 19:57:44 +08:00
parent 21f2c3918e
commit c7b78f0d46
3 changed files with 24 additions and 10 deletions

View File

@@ -1,4 +1,4 @@
import { logger } from './utils';
import { logger, promiseAny } from './utils';
let currentEndpoint = 'https://update.react-native.cn/api';
let backupEndpoints: string[] = [
@@ -13,7 +13,7 @@ let backupEndpointsQueryUrls = [
export async function updateBackupEndpoints() {
if (backupEndpointsQueryUrls) {
try {
const resp = await Promise.race(
const resp = await promiseAny(
backupEndpointsQueryUrls.map((queryUrl) => fetch(queryUrl)),
);
const remoteEndpoints = await resp.json();