mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-01-29 00:35:38 +08:00
refactor: impl structs methods
This commit is contained in:
@@ -13,8 +13,8 @@ export async function getAxios() {
|
||||
try {
|
||||
const info = await getClashInfo();
|
||||
|
||||
if (info?.controller?.server) server = info?.controller?.server;
|
||||
if (info?.controller?.secret) secret = info?.controller?.secret;
|
||||
if (info?.server) server = info?.server;
|
||||
if (info?.secret) secret = info?.secret;
|
||||
} catch {}
|
||||
|
||||
axiosIns = axios.create({
|
||||
@@ -29,7 +29,7 @@ export async function getAxios() {
|
||||
export async function getInfomation() {
|
||||
if (server) return { server, secret };
|
||||
const info = await getClashInfo();
|
||||
return info?.controller!;
|
||||
return info!;
|
||||
}
|
||||
|
||||
/// Get Version
|
||||
|
||||
Reference in New Issue
Block a user