Police-Data-Accessibility-Project / data-sources-app

An API and UI for using and maintaining the Data Sources database
MIT License
3 stars 5 forks source link

Fix bug to allow refresh on quick search results and data source static view #81

Closed kalenluciano closed 1 year ago

kalenluciano commented 1 year ago

Context

Refreshing the live site (https://data-sources.pdap.io/) on any page besides for the home page causes the app to show a 404 error page. Users should be able to refresh their results or data source static view page and the content should persist. This wasn't an issue happening locally in development, so it may be related to deployment. This also might help with sharing links to search results.

Requirements

josh-chamberlain commented 1 year ago

Example: this was generated by a search from another user, but when the link was shared with me, I got a 404. I could go make the search myself and get the results.

https://data-sources.pdap.io/search/Officer%20Involved%20Shootings/detroit

this is (maybe) a heavier lift, but needs to happen anyway and will achieve the desired effect by creating permalinks to searches. consider doing it instead: https://github.com/Police-Data-Accessibility-Project/data-sources-app/issues/21

kalenluciano commented 1 year ago

As @josh-chamberlain mentioned here, I was able to fix this bug by adding a "custom catchall page"