[api] add server endpoint #1590

This commit is contained in:
Alireza Ahmadi
2025-09-17 23:23:16 +02:00
parent 430ade7952
commit d7fd3e2109
6 changed files with 83 additions and 23 deletions

View File

@@ -124,7 +124,7 @@
},
async getNewX25519Cert(){
inModal.loading(true);
const msg = await HttpUtil.post('/server/getNewX25519Cert');
const msg = await HttpUtil.get('/server/getNewX25519Cert');
inModal.loading(false);
if (!msg.success) {
return;
@@ -138,7 +138,7 @@
},
async getNewmldsa65() {
inModal.loading(true);
const msg = await HttpUtil.post('/server/getNewmldsa65');
const msg = await HttpUtil.get('/server/getNewmldsa65');
inModal.loading(false);
if (!msg.success) {
return;

View File

@@ -535,7 +535,7 @@
this.loadingTip = tip;
},
async getStatus() {
const msg = await HttpUtil.post('/server/status');
const msg = await HttpUtil.get('/server/status');
if (msg.success) {
this.setStatus(msg.obj);
}
@@ -545,7 +545,7 @@
},
async openSelectV2rayVersion() {
this.loading(true);
const msg = await HttpUtil.post('server/getXrayVersion');
const msg = await HttpUtil.get('server/getXrayVersion');
this.loading(false);
if (!msg.success) {
return;
@@ -595,7 +595,7 @@
},
async openConfig() {
this.loading(true);
const msg = await HttpUtil.post('server/getConfigJson');
const msg = await HttpUtil.get('server/getConfigJson');
this.loading(false);
if (!msg.success) {
return;