5c5c7b756fcb867e6de225e6c85fe57550ca62cc
Colony.apiaryId was never checked against the target apiary at all - create() would hit a raw Prisma FK-constraint error for a nonexistent apiary instead of a clean 404, and both create() and move() would silently succeed against a deactivated apiary, orphaning the colony the same way (just from the opposite direction) as the apiary-side gap fixed in the previous commit. Adds a shared assertApiaryActive() check, following the same findUnique-then-status pattern already used for cross-entity checks elsewhere (e.g. QueensService.assertMotherQueenExists), used by both create() and move(). Co-Authored-By: Claude Sonnet 5 <[email protected]>
Description
ApiCore - Imkereidokumentationssoftware
https://apicore.encry.de/
7.6 MiB
0 Stars
1 Watchers
0 Forks
Languages
TypeScript
98.5%
JavaScript
0.8%
Python
0.3%
CSS
0.2%
PLpgSQL
0.1%