mirror of
https://github.com/EZ-Api/ez-api.git
synced 2026-01-13 17:47:51 +00:00
feat(provider): add update endpoint and enforce status checks
Add `PUT /admin/providers/{id}` endpoint to allow updating provider
configurations, including status and ban details. Update synchronization
logic to exclude inactive or banned providers from routing tables to
ensure traffic is not routed to them.
This commit is contained in:
@@ -14,4 +14,7 @@ type ProviderDTO struct {
|
||||
AutoBan *bool `json:"auto_ban,omitempty"`
|
||||
BanReason string `json:"ban_reason,omitempty"`
|
||||
BanUntil time.Time `json:"ban_until,omitempty"`
|
||||
|
||||
// Optional control params
|
||||
SkipRouting bool `json:"skip_routing,omitempty"` // if true, do not add to routing tables (e.g., disabled)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user