mirror of
https://github.com/Komediruzecki/token-circles.git
synced 2026-10-20 09:46:43 +02:00
- index.js: drop CSP `script-src 'unsafe-inline'` from the served production bundle (only needed for Vite HMR in dev) by branching on NODE_ENV. - schema.sql: profiles are UNIQUE(user_id, name), not global UNIQUE(name), matching Worker migration 0002 (applies to freshly-created DBs). - routes/transactions.js + repositories/tagsRepo.js: the list endpoint attached tags in an N+1 loop (one query per row); replace with a single batched Map query (getTagsForTransactions). Adds a unit test for the batched tag attach. pnpm -C backend test:unit -> 81. Note: the audit's "reject negative amounts" was intentionally NOT applied — negative expenses are a documented, tested refund feature (BE-TX-047 + the test/e2e/backend-api/transactions.spec.js:786 comment), not corruption.