replace dev section with dev mode toggle, seed/delete mock data on toggle, bump to 2026.03.10.1

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-10 17:50:04 +01:00
parent d9f9006d4b
commit cd2d51ecbe
5 changed files with 229 additions and 212 deletions
@@ -2,6 +2,7 @@ import { Hono } from "hono"
import { castVoteSchema } from "./schema"
import {
castVote,
deleteMockLegislation,
getLegislation,
getLegislationResults,
getLegislationText,
@@ -18,6 +19,11 @@ legislationRouter.post("/seed-mock", async (c) => {
return c.json({ ok: true, count: ids.length, ids }, 201)
})
legislationRouter.delete("/seed-mock", async (c) => {
const count = await deleteMockLegislation()
return c.json({ ok: true, deleted: count })
})
legislationRouter.get("/upcoming", async (c) => {
const items = await getUpcomingLegislation()
return c.json(items)