fix(subscribe): add Enabled filter to node query parameters
This commit is contained in:
@@ -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")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user