Skip to content

What it is

The write side of discord.sh’s topsite. POST /api/v1/ballot/vote takes {listing_id, captcha_token} from a signed-in visitor: the Bearer token is verified against Supabase Auth through jedi::jwt_cache, the captcha against hCaptcha, and the vote is cast as that user through discordsh.service_cast_vote. The 12-hour cooldown per listing, the 50-a-day cap and the listing’s status are enforced there, in Postgres, so they hold whoever calls it.

It runs apart from the discord.sh site so the service_role key and the hCaptcha secret live in this pod only; the page renderer reads what anon may. A session cookie is not accepted — only a Bearer header — so another site’s form cannot vote in a visitor’s name. A missing upstream answers 503 rather than letting a vote through unchecked.

Submitting a listing, the bot’s ownership check and vote webhooks move here next.