diff --git a/application-templates/javascript/event/src/routes/event.route.js b/application-templates/javascript/event/src/routes/event.route.js index ea35735..ded79b2 100644 --- a/application-templates/javascript/event/src/routes/event.route.js +++ b/application-templates/javascript/event/src/routes/event.route.js @@ -5,12 +5,11 @@ import { post } from '../controllers/event.controller.js'; const eventRouter = Router(); -eventRouter.post('/', async (req, res, next) => { +eventRouter.post('/', (req, res, next) => { logger.info('Event message received'); try { - await post(req.body); - res.status(200).send(); + post(req, res); } catch (error) { next(error); } diff --git a/application-templates/javascript/job/src/routes/job.route.js b/application-templates/javascript/job/src/routes/job.route.js index 964d990..327d716 100644 --- a/application-templates/javascript/job/src/routes/job.route.js +++ b/application-templates/javascript/job/src/routes/job.route.js @@ -5,10 +5,9 @@ import { post } from '../controllers/job.controller.js'; // Create the router for our app const jobRouter = Router(); -jobRouter.post('/', async (req, res, next) => { +jobRouter.post('/', (req, res, next) => { try { - await post(req, res); - res.status(200).send(); + post(req, res); } catch (error) { next(error); } diff --git a/application-templates/javascript/service/src/routes/service.route.js b/application-templates/javascript/service/src/routes/service.route.js index 2609a45..51210da 100644 --- a/application-templates/javascript/service/src/routes/service.route.js +++ b/application-templates/javascript/service/src/routes/service.route.js @@ -4,13 +4,11 @@ import { post } from '../controllers/service.controller.js'; const serviceRouter = Router(); -serviceRouter.post('/', async (req, res, next) => { +serviceRouter.post('/', (req, res, next) => { logger.info('Cart update extension executed'); try { - // Add your custom logic here - await post(req.body); - res.status(200).send(); + post(req, res); } catch (error) { next(error); } diff --git a/application-templates/typescript/event/src/routes/event.route.ts b/application-templates/typescript/event/src/routes/event.route.ts index 22d3516..6a097a3 100644 --- a/application-templates/typescript/event/src/routes/event.route.ts +++ b/application-templates/typescript/event/src/routes/event.route.ts @@ -5,11 +5,10 @@ import { post } from '../controllers/event.controller'; const eventRouter: Router = Router(); -eventRouter.post('/', async (req, res, next) => { +eventRouter.post('/', (req, res, next) => { logger.info('Event message received'); try { - await post(req, res); - res.status(200).send(); + post(req, res); } catch (error) { next(error); } diff --git a/application-templates/typescript/job/src/routes/job.route.ts b/application-templates/typescript/job/src/routes/job.route.ts index 3a0dbf1..858d47f 100644 --- a/application-templates/typescript/job/src/routes/job.route.ts +++ b/application-templates/typescript/job/src/routes/job.route.ts @@ -5,10 +5,9 @@ import { post } from '../controllers/job.controller'; // Create the router for our app const jobRouter: Router = Router(); -jobRouter.post('/', async (req, res, next) => { +jobRouter.post('/', (req, res, next) => { try { - await post(req, res); - res.status(200).send(); + post(req, res); } catch (error) { next(error); } diff --git a/application-templates/typescript/service/src/routes/service.route.ts b/application-templates/typescript/service/src/routes/service.route.ts index 3fd93f8..cff1253 100644 --- a/application-templates/typescript/service/src/routes/service.route.ts +++ b/application-templates/typescript/service/src/routes/service.route.ts @@ -4,12 +4,11 @@ import { post } from '../controllers/service.controller'; const serviceRouter = Router(); -serviceRouter.post('/', async (req, res, next) => { +serviceRouter.post('/', (req, res, next) => { logger.info('Service post message received'); try { - await post(req, res); - res.status(200).send(); + post(req, res); } catch (error) { next(error); }