fix(subscribe): add Enabled filter to node query parameters

This commit is contained in:
Chang lue Tsen
2025-09-27 10:18:08 -04:00
parent c1c324878b
commit d2ca3eb961
2 changed files with 8 additions and 0 deletions
+5
View File
@@ -37,6 +37,7 @@ type FilterNodeParams struct {
Search string // Search Address or Name
Protocol string // Protocol
Preload bool // Preload Server
Enabled *bool // Enabled
}
// FilterServerList Filter Server List
@@ -88,6 +89,10 @@ func (m *customServerModel) FilterNodeList(ctx context.Context, params *FilterNo
query = query.Where("protocol = ?", params.Protocol)
}
if params.Enabled != nil {
query = query.Where("enabled = ?", *params.Enabled)
}
if params.Preload {
query = query.Preload("Server")
}