mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-07-25 13:56:10 +00:00
fix(nodes): make node API tokens write-only (#5613)
* fix(nodes): make node API tokens write-only * fix(nodes): keep token optional on edit for write-only API tokens NodeView no longer returns apiToken, so the edit form must consume hasApiToken and not require re-entering the token. Relaxes the form validation on edit, adds a keep-current placeholder, and adds the i18n key to all 13 locales.
This commit is contained in:
@@ -157,6 +157,14 @@ func (s *NodeService) GetNodeTree() ([]*model.Node, error) {
|
||||
return all, nil
|
||||
}
|
||||
|
||||
func (s *NodeService) GetNodeTreeView() ([]*NodeView, error) {
|
||||
nodes, err := s.GetNodeTree()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return toNodeViews(nodes), nil
|
||||
}
|
||||
|
||||
// recountByGuid recomputes InboundCount/OnlineCount/DepletedCount for every node
|
||||
// in the tree, keyed by the GUID that physically hosts each inbound, so a direct
|
||||
// node shows only its own inbounds and each transitive node shows its own
|
||||
|
||||
Reference in New Issue
Block a user