Skip to content
This repository has been archived by the owner on Dec 2, 2022. It is now read-only.

Combine API endpoints to reduce SQL duplication #26

Open
copelco opened this issue Nov 28, 2014 · 1 comment
Open

Combine API endpoints to reduce SQL duplication #26

copelco opened this issue Nov 28, 2014 · 1 comment

Comments

@copelco
Copy link
Member

copelco commented Nov 28, 2014

I'm thinking it might be more efficient to simplify the API to two calls: stops and stops by reason.

Stops:

    {
        "stops": [{...}],
        "searches": [{...}],
        "contraband": [{...}],
        "use_of_force": [{...}],
    }

Stops by reason:

    {
        "stops": [{...}],
        "searches": [{...}],
    }

I'm not sure how much this would change the front-end code though. Just a proposal/thought for now.

@shapiromatron
Copy link
Member

I think that's a good idea and it'll reduce the API calls overall; open for the frontend refactoring needed to do so.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants