(req, res)
| 40 | }; |
| 41 | |
| 42 | const getProfileDiff = async (req, res) => { |
| 43 | try { |
| 44 | const result = await profileDiffsQuery.fetchProfileDiff(req.params.id); |
| 45 | if (result.profileDiffExists) { |
| 46 | return res.json({ |
| 47 | message: "Profile Diff returned successfully!", |
| 48 | profileDiff: result, |
| 49 | }); |
| 50 | } |
| 51 | |
| 52 | return res.boom.notFound("Profile Diff doesn't exist"); |
| 53 | } catch (error) { |
| 54 | logger.error(`Error while fetching Profile Diff: ${error}`); |
| 55 | return res.boom.serverUnavailable(SOMETHING_WENT_WRONG); |
| 56 | } |
| 57 | }; |
| 58 | |
| 59 | module.exports = { |
| 60 | getProfileDiffs, |
nothing calls this directly
no outgoing calls
no test coverage detected