unit test fixes + error refactor
All checks were successful
Deploy to Test Environment / deploy-to-test (push) Successful in 12m45s
All checks were successful
Deploy to Test Environment / deploy-to-test (push) Successful in 12m45s
This commit is contained in:
@@ -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
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user