Cloudflare Worker API for managing WinVote proposals using D1 database.
/health
/api/winvote/proposals
?status=active, ?limit=50, ?offset=0
/api/winvote/proposals
requires x-api-key
start_block and
end_block to timestamps.
proposal_id, title,
proposer, start_block, end_block
time_start and time_end in ISO format.
/api/winvote/archive
requires x-api-key
{"beforeDate": "2025-01-01"}
/create-tables
requires x-api-key
?test=true to insert test data with realistic block numbers.
POST endpoints require an x-api-key header with the correct API key.
All endpoints return JSON responses with success: true/false and relevant data.