Problem
decide() POSTs {id: approval.id, ...} to /api/approve with no empty-string check, sending meaningless approve/deny calls.
Where
lib/api.ts (decide, no id guard before fetch).
Acceptance
Add a failing test first calling decide({id: "", ...}, true), expecting false without calling fetch. Then fix.
Note: this repo has no test runner configured yet. Setting up a minimal vitest (or equivalent) config is part of this issue.
Problem
decide()POSTs{id: approval.id, ...}to/api/approvewith no empty-string check, sending meaningless approve/deny calls.Where
lib/api.ts(decide, no id guard before fetch).Acceptance
Add a failing test first calling
decide({id: "", ...}, true), expectingfalsewithout callingfetch. Then fix.Note: this repo has no test runner configured yet. Setting up a minimal vitest (or equivalent) config is part of this issue.