Skip to content
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

Merged
merged 3 commits into from
May 15, 2020
Merged

Conversation

janedotx
Copy link

Just removing a redundant line.

PR Checklist

  • simple searchable title - [mds-db] Add PG env var, [config] Fix eslint config
  • briefly describe the changes in this PR
  • mark as draft if should not be merged
  • write tests for all new functionality

Impacts

  • Provider
  • Agency
  • Audit
  • Policy
  • Compliance
  • Daily
  • Native
  • Policy Author

@@ -441,7 +441,6 @@ function api(app: express.Express): express.Express {

// Validate input params
if (
isValidAuditEventId(audit_event_id) &&

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?

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.

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.

Copy link

@macsj200 macsj200 left a 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) &&

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.

Copy link

@marie-x marie-x left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@janedotx janedotx merged commit ea44857 into develop May 15, 2020
@janedotx janedotx deleted the fix/minor-audit-cleanup branch May 15, 2020 15:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants