unit test fixes + error refactor
All checks were successful
Deploy to Test Environment / deploy-to-test (push) Successful in 12m45s

This commit is contained in:
2025-12-11 20:26:34 -08:00
parent 27ef5901f1
commit 5d7598eadf
6 changed files with 102 additions and 37 deletions

View File

@@ -154,7 +154,7 @@ router.put('/recipes/:id/status', async (req, res, next: NextFunction) => {
const updatedRecipe = await db.adminRepo.updateRecipeStatus(recipeId, status); // This is still a standalone function in admin.db.ts
res.status(200).json(updatedRecipe);
} catch (error) {
next(error);
next(error); // Pass all errors to the central error handler
}
});