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

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

Revise `/data-sources-map` #438

Open maxachis opened 2 months ago

maxachis commented 2 months ago

Context

Requirements

Tests

Docs

Open questions

josh-chamberlain commented 2 months ago

@maxachis We do still need the endpoint (for now). For your context, here's the primary user of the endpoint: https://github.com/Police-Data-Accessibility-Project/data-source-map/pull/15

I believe the reason for the dedicated endpoint was due to better performance in this specific use case, but probably there's an appropriate solution.

maxachis commented 2 weeks ago

@josh-chamberlain I've begun working on bringing this back online (although possibly with a different endpoint name), but I would point out that as far as performance goes, loading every single entry every time may incur some performance costs, particularly as the number of data sources/agencies we get expands. So it may be useful to think about a more substantial revision further down the line.

josh-chamberlain commented 2 weeks ago

@maxachis true...the front end should probably make use of caching, too.

maxachis commented 6 days ago

Note to Max: This endpoint has been implemented, but it's not showing up as expected in the documentation, presumably because it overlaps with the other logic.

To solve this, just create a new /map namespace, with /data-sources appended to it. Make others aware of this breaking change.

maxachis commented 6 days ago

Now it's been fixed!