warp - optimize utility code

This commit is contained in:
mhsanaei
2025-03-12 19:24:39 +01:00
parent 315d852087
commit 280a22b57d
2 changed files with 10 additions and 13 deletions

View File

@@ -176,10 +176,10 @@
},
async register() {
warpModal.loading(true);
keys = Wireguard.generateKeypair();
const keys = Wireguard.generateKeypair();
const msg = await HttpUtil.post('/panel/xray/warp/reg', keys);
if (msg.success) {
resp = JSON.parse(msg.obj);
const resp = JSON.parse(msg.obj);
warpModal.warpData = resp.data;
warpModal.warpConfig = resp.config;
this.collectConfig();