fix path endpoint

This commit is contained in:
Дмитрий Саенко 2025-10-26 23:03:46 +03:00
parent d7d129ced5
commit 599686ea34
2 changed files with 3 additions and 3 deletions

View file

@ -777,7 +777,7 @@ func (s *InboundService) DelInboundClient(inboundId int, clientId string) (bool,
}
}
s.syncWithSlaves(http.MethodPost, "panel/inbounds/api", "application/x-www-form-urlencoded", nil, nil, strconv.Itoa(inboundId), "delClient", clientId)
s.syncWithSlaves(http.MethodPost, "panel/api/inbounds", "application/x-www-form-urlencoded", nil, nil, strconv.Itoa(inboundId), "delClient", clientId)
return needRestart, db.Save(oldInbound).Error
}
@ -2519,7 +2519,7 @@ func (s *InboundService) syncWithSlaves(method string, path string, contentType
if resp.StatusCode != http.StatusOK {
bodyBytes, _ := io.ReadAll(resp.Body)
logger.Warningf("Failed to sync with server %s. Status: %s, Body: %s", server.Name, resp.Status, string(bodyBytes), resp)
logger.Warningf("Failed to sync with server %s. Status: %s, Body: %s", server.Name, resp.Status, string(bodyBytes))
}
//logger.Infof("Synced inbound %v to server %v (%v)", bodyData.(*model.Inbound).Tag, server.Name, resp.Status)
}

View file

@ -34,7 +34,7 @@ func (s *MultiServerService) GetOnlineClients() (map[int][]string, error) {
return nil, err
}
var clients map[int][]string
clients := make( map[int][]string)
for _, server := range servers {
var onlineResp struct {
Success bool `json:"success"`