Skip to content

Commit

Permalink
fix(app): address sonarcloud issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Demwunz committed May 1, 2024
1 parent b7c1a38 commit 9228ff3
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 9 deletions.
6 changes: 2 additions & 4 deletions app/controllers/return-requirements.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,9 @@ async function checkYourAnswers (request, h) {
async function deleteNote (request, h) {
const { sessionId } = request.params

const notificationData = await DeleteNoteService.go(sessionId, request.yar)
await DeleteNoteService.go(sessionId, request.yar)

if (notificationData.title) {
return h.redirect(`/system/return-requirements/${sessionId}/check-your-answers`)
}
return h.redirect(`/system/return-requirements/${sessionId}/check-your-answers`)
}

async function existing (request, h) {
Expand Down
4 changes: 0 additions & 4 deletions app/services/return-requirements/submit-add-note.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,6 @@ async function go (sessionId, payload, user, yar) {
function _notification (session, newNote) {
const { data: { note } } = session

if (note && note.content === newNote) {
return ''
}

if (!note && newNote) {
return {
title: 'Added',
Expand Down
1 change: 0 additions & 1 deletion app/views/return-requirements/check-your-answers.njk
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@
text: notification.text
}) }}
{% endif %}

{# Main heading #}
<div class="govuk-body">
<h1 class="govuk-heading-xl govuk-!-margin-bottom-3">
Expand Down

0 comments on commit 9228ff3

Please sign in to comment.