Skip to content

Commit

Permalink
OFMCC-364 - clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
vietle-cgi committed Nov 3, 2023
1 parent 9957dae commit 7870167
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
14 changes: 7 additions & 7 deletions backend/src/components/message.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 )
}
}

Expand Down
1 change: 0 additions & 1 deletion frontend/src/common/apiService.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 7870167

Please sign in to comment.