Skip to content

Commit

Permalink
Update api.py
Browse files Browse the repository at this point in the history
  • Loading branch information
michplunkett committed Dec 19, 2024
1 parent 6485464 commit 659993a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions OpenOversight/app/api/v1/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,14 @@
put_database_cache_entry,
)
from OpenOversight.app.utils.constants import KEY_DEPT_ALL_OFFICERS
from OpenOversight.app.utils.flask import limiter


v1 = Blueprint("v1", __name__, url_prefix="/v1")


@v1.route("/departments/<int:department_id>/officers", methods=[HTTPMethod.GET])
@limiter.limit("5/minute")
def download_dept_officers(department_id: int):
cache_params = (Department(id=department_id), KEY_DEPT_ALL_OFFICERS)
officers = get_database_cache_entry(*cache_params)
Expand Down

0 comments on commit 659993a

Please sign in to comment.