Files
pezkuwi-telegram-miniapp/supabase
pezkuwichain 41bfd70322 feat(db): add ai_chat_log so the ask endpoint is actually rate limited
`ask` has never been deployed, and the CI step in this branch will publish it.
Its limiter counts rows in ai_chat_log to cap requests at 8/min and 120/day per
IP, but no migration ever created that table, and the limiter fails open when
the count cannot be read.

Shipping `ask` without this would put an unauthenticated endpoint with
Access-Control-Allow-Origin: * in front of paid model APIs with no limit at all.

Applied to the live database as well.
2026-07-29 22:36:06 -07:00
..