| 1 |
weapons = ["Ninjato", "Shuriken", "Katana", "Kama", "Kunai", "Naginata", "Yari"] |
| 2 |
|
| 3 |
|
| 4 |
@api.get("/weapons/search") |
| 5 |
def search_weapons(request, q: str, offset: int = 0): |
| 6 |
results = [w for w in weapons if q in w.lower()] |
| 7 |
return results[offset : offset + 10] |