-
Notifications
You must be signed in to change notification settings - Fork 9
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
[mds-audit] Extremely small audit fix. #320
Conversation
@@ -441,7 +441,6 @@ function api(app: express.Express): express.Express { | |||
|
|||
// Validate input params | |||
if ( | |||
isValidAuditEventId(audit_event_id) && |
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.
I wonder if this was meant to validate the audit trip id?
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.
I'm not entirely sue what audit_event_id
is used for (haven't dug into the audit code much besides /vehicles
), but this line is simply a dupe of the line right below it.
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.
audit_event_id
is just a unique uuid assigned to the audit event. Probably not used for much other than tracking in the db (from back before our tables had id columns). I understand it's a dupe. My point was, that perhaps it was a copy-pasta error and should have been isValidAuditTripId(audit_trip_id)
to validate the uuid in the route param, but looking at the code it appears that check already happens in some earlier middleware.
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.
I too wonder if that was there for a reason, and it was just a typo
@@ -441,7 +441,6 @@ function api(app: express.Express): express.Express { | |||
|
|||
// Validate input params | |||
if ( | |||
isValidAuditEventId(audit_event_id) && |
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.
I'm not entirely sue what audit_event_id
is used for (haven't dug into the audit code much besides /vehicles
), but this line is simply a dupe of the line right below it.
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.
LGTM
Just removing a redundant line.
PR Checklist
[mds-db] Add PG env var
,[config] Fix eslint config
Impacts