更新
This commit is contained in:
@@ -29,7 +29,7 @@ function loadHosts() {
|
||||
showLoading(tbody);
|
||||
|
||||
// 更新API路径,使用完整路径
|
||||
apiRequest('/shield/hosts', 'GET')
|
||||
apiRequest('/api/shield/hosts', 'GET')
|
||||
.then(data => {
|
||||
// 处理不同格式的响应数据
|
||||
let hostsData;
|
||||
@@ -156,7 +156,7 @@ function addHostsEntry() {
|
||||
}
|
||||
|
||||
// 修复重复API调用问题,只调用一次
|
||||
apiRequest('/shield/hosts', 'POST', { ip: ip, domain: domain })
|
||||
apiRequest('/api/shield/hosts', 'POST', { ip: ip, domain: domain })
|
||||
.then(data => {
|
||||
// 处理不同的响应格式
|
||||
if (data.success || data.status === 'success') {
|
||||
@@ -209,7 +209,7 @@ function deleteHostsEntry(ip, domain) {
|
||||
}
|
||||
|
||||
// 更新API路径
|
||||
apiRequest('/shield/hosts', 'DELETE', { ip: ip, domain: domain })
|
||||
apiRequest('/api/shield/hosts', 'DELETE', { ip: ip, domain: domain })
|
||||
.then(data => {
|
||||
// 处理不同的响应格式
|
||||
if (data.success || data.status === 'success') {
|
||||
|
||||
Reference in New Issue
Block a user