You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor(http): consolidate UI list handler filter parsing into BaseFilter (#173)
* refactor(http): consolidate UI list handler filter parsing into BaseFilter
Introduce filters.BaseFilter with shared Q, Enabled, Sort, Dir fields
and a ParseBaseFilter() helper that centralizes common query param
parsing logic. Three filter types now embed BaseFilter instead of
duplicating the same trim/parse patterns:
- iocsFilter: delegates Q and Enabled parsing to BaseFilter
- sitesFilter: delegates Q, Enabled, Sort, Dir parsing to BaseFilter
- sourcesFilters: delegates Q parsing to BaseFilter (keeps IncludeTests)
Removes ~40 lines of duplicated filter parsing code across three files.
All existing tests pass; golangci-lint reports 0 issues.
* chore: remove code-reduction-findings.md from PR
* chore: remove AGENT.md from PR
* refactor(http): use WrapListFetcher for secrets and alert sinks handlers
Add WrapListFetcher generic adapter in list_handler.go that adapts
a service List(ctx, limit, offset) call into a ListFetcher with
consistent pagination bounds and error logging.
Replace inline Fetcher closures in ui_secrets.go and
ui_alert_sinks.go with WrapListFetcher calls, removing ~20 lines
of duplicated boilerplate.
0 commit comments