From 7870167f2e44ecfcacef13aa168696e5403a769d Mon Sep 17 00:00:00 2001 From: Le Date: Fri, 3 Nov 2023 16:00:27 -0700 Subject: [PATCH] OFMCC-364 - clean up --- backend/src/components/message.js | 14 +++++++------- frontend/src/common/apiService.js | 1 - 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/backend/src/components/message.js b/backend/src/components/message.js index 42efedc4..99978a93 100644 --- a/backend/src/components/message.js +++ b/backend/src/components/message.js @@ -64,21 +64,21 @@ async function getMessages(req, res) { async function updateMessageLastOpenedTime(req, res) { try { - let response = await patchOperationWithObjectId('emails', req.params.messageId, req.body); - return res.status(HttpStatus.OK).json(response); + let response = await patchOperationWithObjectId('emails', req.params.messageId, req.body) + return res.status(HttpStatus.OK).json(response) } catch (e) { - return res.status(HttpStatus.INTERNAL_SERVER_ERROR).json(e.data? e.data : e?.status ); + return res.status(HttpStatus.INTERNAL_SERVER_ERROR).json(e.data? e.data : e?.status ) } } async function createNewAssistanceRequest(req, res) { try { - let payload = mapAssistanceRequestObjectForBack(req.body); - let response = await postOperation('ofm_assistance_requests?$select=ofm_name', payload); + let payload = mapAssistanceRequestObjectForBack(req.body) + let response = await postOperation('ofm_assistance_requests?$select=ofm_name', payload) response = new MappableObjectForFront(response, AssistanceRequestMappings).toJSON() - return res.status(HttpStatus.OK).json(response); + return res.status(HttpStatus.OK).json(response) } catch (e) { - return res.status(HttpStatus.INTERNAL_SERVER_ERROR).json(e.data? e.data : e?.status ); + return res.status(HttpStatus.INTERNAL_SERVER_ERROR).json(e.data? e.data : e?.status ) } } diff --git a/frontend/src/common/apiService.js b/frontend/src/common/apiService.js index 6c8456e9..167c0a55 100644 --- a/frontend/src/common/apiService.js +++ b/frontend/src/common/apiService.js @@ -111,7 +111,6 @@ export default { try{ return await apiAxios.get(ApiRoutes.LOOKUP); } catch(e) { - console.log(e); console.log(`Failed to get from Nodejs getLookups API - ${e}`); throw e; }