-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HOFF-659: update nrm to use axios #591
HOFF-659: update nrm to use axios #591
Conversation
a716191
to
b7766a8
Compare
ab67f25
to
12f214b
Compare
b4cb2dc
to
816bde3
Compare
6af2eb4
to
634c226
Compare
5513123
to
1eb1d45
Compare
c1e7d9e
to
0cbad1e
Compare
c70fdfe
to
50f0913
Compare
5ef627a
to
a408ddf
Compare
a408ddf
to
b5eb942
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @Rhodine-orleans-lindsay PR looks good. I added some comments on there. Let me know what you think. I can then approve this PR.
@@ -78,6 +80,9 @@ module.exports = superclass => class extends superclass { | |||
} | |||
req.sessionModel.set('redirect-to-reports', false); | |||
return super.getValues(req, res, next); | |||
}); | |||
} catch (error) { | |||
req.log('info', `External ID: ${externalID}, Error Saving Session: ${error}`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have been using the logger tool from HoF, just curious as to why logger is not use in this try catch block? Logger is also not used in the save-form-session.js file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When we pass a req object to a function eg. getValues(req, res, next)
, saveValues(req, res, next)
, etc, we can use req.log. In hof, req.log uses the hof logger in conjunction with another logging middleware called Morgan which allows us to access some additional information in the logs such as the session id. If a function does not use the req object, then using the hof logger is enough.
@@ -158,7 +158,8 @@ module.exports = { | |||
], | |||
locals: { showSaveAndExit: true }, | |||
fields: ['were-they-taken-somewhere-by-their-exploiter', | |||
'were-they-taken-somewhere-by-their-exploiter-journey-details'], | |||
'were-they-taken-somewhere-by-their-exploiter-journey-details' | |||
], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is an extra line that has been added here. Maybe to keep it consistent with other fields the square bracket and comma could be line 161.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks I have now made changes to keep the formatting consistent with other fields where the fields are on separate lines e.g. lines 288-230. For the fields above, both fields are now on separate lines from the square brackets.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Rhodine, for clarifying these changes. Code looks good to me.
79da3b3
to
2812f0b
Compare
2812f0b
to
7dac16e
Compare
- update hof version to use axios - remove request module in package.json vulnerabilities - update yarn.lock - update node images and dependencies to resolve vulnerabilities - remove deprecated request-native-promise from package.json and acceptance tests and replace with axios - refactored code in save-form-session, resume-form-session, delete-form-session, are-you-sure and continue-report behaviours to use hof model instead of request - update icasework-resolver image
7dac16e
to
837fb4a
Compare
What?
Why?
How?
Testing?
Screenshots (optional)
Anything Else? (optional)
Check list
here is an example commit