chore: drop sdd scratch from repo, ignore build artifacts
This commit is contained in:
1 parent
98387bd2d2
commit
be6aac86ce
2 files changed
+5
-20
No files matched your search
@@ -1,2 +1,7 @@
|
||||
.worktrees/
|
||||
.superpowers/
|
||||
node_modules/
|
||||
.next/
|
||||
.env
|
||||
.env*.local
|
||||
*.tsbuildinfo
|
||||
@@ -1,20 +0,0 @@
|
||||
|
||||
## Final fix wave (5 must-fix) — 2026-10-18
|
||||
Branch: feat/gutscheinverwaltung
|
||||
|
||||
### Changes
|
||||
1. `app/api/vouchers/route.ts`: reminderDays provided-but-all-invalid (e.g. "bald") → 400 `{errors:["reminderDays"]}`; empty/absent still falls back to DEFAULT_REMINDER_DAYS. `app/vouchers/new/page.tsx` shows reminderDays field error.
|
||||
2. `app/api/vouchers/route.ts`: contactIds validated via `contact.findMany` before create; unknown id → 400 `{errors:["contactIds"]}` (statt P2003→500).
|
||||
3. `lib/vouchers.ts`: `VOUCHER_SOON_DAYS` 14→30 (Spec), stale TODO(Task 6) entfernt. API-Route + Page nutzen bereits shared helper `isExpiringSoon`.
|
||||
4. `app/api/cron/check/route.ts`: Idempotenz gehärtet — `claimSlot()` legt atomar Pending-Zeile (`status "versendet"`) vor Send an; Unique-Konflikt (P2002) → `gesendet`/`versendet` = skip, `fehler` = retry (zurück auf pending + senden). `alreadySent` erkennt auch `versendet`.
|
||||
5. `lib/session.ts` neu (nur jose: SESSION_COOKIE/createSession/verifySession); `middleware.ts` importiert nur daraus (Edge-safe, kein bcrypt). `lib/auth.ts` re-exportiert Session-Helper + behält `verifyPassword` (bcrypt) für Login-Route. Kein Behavior-Change.
|
||||
|
||||
### Tests
|
||||
- `tests/reminders.test.ts`: parseReminderDays "30,6,1"→[30,6,1], undefined→Default, "bald"/"abc,!!"→[] (=API 400), "30,bald,1"→[30,1].
|
||||
- `tests/vouchers-validate.test.ts`: VOUCHER_SOON_DAYS=30, isExpiringSoon 20d=true / 40d=false.
|
||||
- Keine Test-Referenz auf 14 vorhanden.
|
||||
|
||||
### Commands & outputs
|
||||
- `npx tsc --noEmit` → exit 0, keine Fehler.
|
||||
- `npx vitest run` → 8 files, 21 tests, alle passed.
|
||||
- `npm run build` → erfolgreich, Middleware 38.9 kB, alle Routen gebaut.
|
||||
Reference in new issue
Block a user