hsiegeln
|
30a447a3ea
|
refactor(client): requireProfile() + asyncFetch wrapper
requireProfile():
- src/lib/client/profile.svelte.ts: neuer Helper, returnt das aktive
Profile oder null nach standardisiertem alertAction
- 5x in recipes/[id]/+page.svelte: setRating, toggleFavorite, logCooked,
addComment, toggleWishlist verlieren je 7 Zeilen Guard-Klausel
- profile-Variable im Closure macht den ! am profileStore.active obsolet
asyncFetch():
- src/lib/client/api-fetch-wrapper.ts: returnt Response auf 2xx, null
nach alertAction auf Fehler
- 4 Call-Sites umgestellt: saveRecipe + saveTitle (recipes/[id]),
saveEdit (admin/domains), rename (admin/profiles)
- admin/domains add() bewusst nicht migriert — inline-Error-UX statt Modal
Findings aus REVIEW-2026-04-18.md (Quick-Win 5) und redundancy.md
|
2026-04-18 22:22:19 +02:00 |
|