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:
parent
4edf94f416
commit
7096f30566
3 changed files with 23 additions and 3 deletions
|
|
@ -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 ")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue