Skip to content

Commit

Permalink
Add send to updateLastViewedVacanciesAndTurnoverMessage to stop endpo…
Browse files Browse the repository at this point in the history
…int response timing out
  • Loading branch information
duncanc19 committed Jan 9, 2025
1 parent ccf5b49 commit 80e3cae
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion backend/server/routes/accounts/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -921,7 +921,7 @@ const updateLastViewedVacanciesAndTurnoverMessage = async (req, res) => {

await models.user.setDateForLastViewedVacanciesAndTurnoverMessage(userUid);

return res.status(200);
return res.status(200).send('Last viewed date updated');
} catch (error) {
return res.status(500).send('Failed to update last viewed date');
}
Expand Down
1 change: 1 addition & 0 deletions backend/server/test/unit/routes/accounts/user.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,7 @@ describe('user.js', () => {
await updateLastViewedVacanciesAndTurnoverMessage(req, res);

expect(res.statusCode).to.equal(200);
expect(res._getData()).to.deep.equal('Last viewed date updated');
});

it('should return 400 response if userUid in params invalid', async () => {
Expand Down

0 comments on commit 80e3cae

Please sign in to comment.