feat(inventory-go): wire spell filters into /search/items; harden empty-input guards

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Erik 2026-07-14 23:53:38 +02:00
parent 4edf94f416
commit 7096f30566
3 changed files with 23 additions and 3 deletions

View file

@ -302,6 +302,9 @@ func (s *Server) runSearch(ctx context.Context, q url.Values) (map[string]any, e
}
}
// --- spell filters: has_spell / spell_contains / legendary_cantrips ---
conds = append(conds, spellFilterConds(q, s.spells, ab)...)
where := ""
if len(conds) > 0 {
where = " WHERE " + strings.Join(conds, " AND ")