From a1a595c8f0918be9a4b8e348895912da3ff3e480 Mon Sep 17 00:00:00 2001 From: "CHIEFSOFT\\ameye" Date: Thu, 31 Oct 2024 17:15:48 -0400 Subject: [PATCH] Remove the sync --- service/cards.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/service/cards.js b/service/cards.js index 4a835c7..8f27f8f 100644 --- a/service/cards.js +++ b/service/cards.js @@ -281,7 +281,7 @@ var cards = { } next(null, resultItem ); // pass control to the next handler }, - activateCard: async function (req, res, next) { + activateCard: function (req, res, next) { try { logger.info(req.body); @@ -323,16 +323,13 @@ var cards = { next(null, resultItem); // pass control to the next handler }); } - }); - } catch (e) { next(e.message, null); // pass control to the next handler } }); - } catch (error) { - await res.status(500).json({error: `Internal Server error 002 ${error} `}); + res.status(500).json({error: `Internal Server error 002 ${error} `}); }