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

Update ID and URL paths to use full city name and state two letter code #57

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mpuckett159
Copy link
Collaborator

Closes #33
Basically just "future proofing."

All existing paths copied for legacy support.

Tested with current version of 1-312-hows-my-driving to confirm that the website continues to work as intended. Please be sure to validate but couldn't find any issues.

Basically just future proofing. Also copying all paths for legacy support just in case.
Copy link
Collaborator

@AetherUnbound AetherUnbound left a comment

Choose a reason for hiding this comment

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

Looks good, I think we will need to end up changing 1-312 though

@@ -97,18 +97,18 @@ func (c *Client) SeattleOfficerMetadata() *DepartmentMetadata {
},
LastAvailableRosterDate: date.Format("2006-01-02"),
Name: "Seattle PD",
ID: "spd",
ID: "seattle-wa",
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm pretty sure we'll also need to update 1-312 with this new ID here: https://github.com/OrcaCollective/1-312-hows-my-driving/blob/main/src/app.py#L106

@mpuckett159
Copy link
Collaborator Author

This should maintain backwards compatibility for the existing endpoints and... I'm pretty sure it works with 1-312 with no update but I would have to look again to explain exactly why.

@AetherUnbound
Copy link
Collaborator

That metadata is pulled from /departments and it's attempting to get a record with ID spd, which no longer exists. I think it may still work, a user would just have to select a dataset first.

@mpuckett159
Copy link
Collaborator Author

FYI the departments metadata return got updated here so it should propagate out to the website. Even if it doesn't I have the old endpoints down at the bottom of the router file just in case anyone is using this.

E.g.:
https://github.com/OrcaCollective/spd-lookup/pull/57/files#diff-a3227344355f9398fa4f2a24075d12d71808b56b04d182197d53b6d6ff505605L70
Changed from apd to auburn-wa in the metadata.

And:
https://github.com/OrcaCollective/spd-lookup/pull/57/files#diff-9039ed29dc485554a6579ed1b461b458d9d3a48d7da4da4f3500cc9890306aa7R83
the /seattle/ etc endpoints still exist and get routed.

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.

Update DepartmentMetadata ID field to be more descriptive
2 participants