diff options
| author | Sanaei <ho3ein.sanaei@gmail.com> | 2025-09-09 02:22:43 +0300 |
|---|---|---|
| committer | mhsanaei <ho3ein.sanaei@gmail.com> | 2025-09-09 03:32:05 +0300 |
| commit | fe9f0d1d0e86f55a97e3905358888f595b9bd08b (patch) | |
| tree | 2210606a64b38e89edf4197268957913efbb7f06 /web/html/index.html | |
| parent | 18d74d54caa5f55b8d9048b49ad28b42be31b322 (diff) | |
api (#3434)
Diffstat (limited to 'web/html/index.html')
| -rw-r--r-- | web/html/index.html | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/web/html/index.html b/web/html/index.html index 42b8a032..5d5c3b1d 100644 --- a/web/html/index.html +++ b/web/html/index.html @@ -746,7 +746,7 @@ ${dateTime} }, async getStatus() { try { - const msg = await HttpUtil.post('/server/status'); + const msg = await HttpUtil.get('/panel/api/server/status'); if (msg.success) { if (!this.loadingStates.fetched) { this.loadingStates.fetched = true; @@ -763,7 +763,7 @@ ${dateTime} }, async openSelectV2rayVersion() { this.loading(true); - const msg = await HttpUtil.post('server/getXrayVersion'); + const msg = await HttpUtil.get('/panel/api/server/getXrayVersion'); this.loading(false); if (!msg.success) { return; @@ -780,7 +780,7 @@ ${dateTime} onOk: async () => { versionModal.hide(); this.loading(true, '{{ i18n "pages.index.dontRefresh"}}'); - await HttpUtil.post(`/server/installXray/${version}`); + await HttpUtil.post(`/panel/api/server/installXray/${version}`); this.loading(false); }, }); @@ -798,9 +798,9 @@ ${dateTime} onOk: async () => { versionModal.hide(); this.loading(true, '{{ i18n "pages.index.dontRefresh"}}'); - const url = isSingleFile - ? `/server/updateGeofile/${fileName}` - : `/server/updateGeofile`; + const url = isSingleFile + ? `/panel/api/server/updateGeofile/${fileName}` + : `/panel/api/server/updateGeofile`; await HttpUtil.post(url); this.loading(false); }, @@ -808,7 +808,7 @@ ${dateTime} }, async stopXrayService() { this.loading(true); - const msg = await HttpUtil.post('server/stopXrayService'); + const msg = await HttpUtil.post('/panel/api/server/stopXrayService'); this.loading(false); if (!msg.success) { return; @@ -816,7 +816,7 @@ ${dateTime} }, async restartXrayService() { this.loading(true); - const msg = await HttpUtil.post('server/restartXrayService'); + const msg = await HttpUtil.post('/panel/api/server/restartXrayService'); this.loading(false); if (!msg.success) { return; @@ -824,7 +824,7 @@ ${dateTime} }, async openLogs(){ logModal.loading = true; - const msg = await HttpUtil.post('server/logs/'+logModal.rows,{level: logModal.level, syslog: logModal.syslog}); + const msg = await HttpUtil.post('/panel/api/server/logs/'+logModal.rows,{level: logModal.level, syslog: logModal.syslog}); if (!msg.success) { return; } @@ -834,7 +834,7 @@ ${dateTime} }, async openXrayLogs(){ xraylogModal.loading = true; - const msg = await HttpUtil.post('server/xraylogs/'+xraylogModal.rows,{filter: xraylogModal.filter, showDirect: xraylogModal.showDirect, showBlocked: xraylogModal.showBlocked, showProxy: xraylogModal.showProxy}); + const msg = await HttpUtil.post('/panel/api/server/xraylogs/'+xraylogModal.rows,{filter: xraylogModal.filter, showDirect: xraylogModal.showDirect, showBlocked: xraylogModal.showBlocked, showProxy: xraylogModal.showProxy}); if (!msg.success) { return; } @@ -844,7 +844,7 @@ ${dateTime} }, async openConfig() { this.loading(true); - const msg = await HttpUtil.post('server/getConfigJson'); + const msg = await HttpUtil.get('/panel/api/server/getConfigJson'); this.loading(false); if (!msg.success) { return; @@ -855,7 +855,7 @@ ${dateTime} backupModal.show(); }, exportDatabase() { - window.location = basePath + 'server/getDb'; + window.location = basePath + 'panel/api/server/getDb'; }, importDatabase() { const fileInput = document.createElement('input'); @@ -868,7 +868,7 @@ ${dateTime} formData.append('db', dbFile); backupModal.hide(); this.loading(true); - const uploadMsg = await HttpUtil.post('server/importDB', formData, { + const uploadMsg = await HttpUtil.post('/panel/api/server/importDB', formData, { headers: { 'Content-Type': 'multipart/form-data', } |
