diff options
| author | Christian Cleberg <[email protected]> | 2026-04-11 12:34:11 -0500 |
|---|---|---|
| committer | Christian Cleberg <[email protected]> | 2026-04-11 12:34:11 -0500 |
| commit | 1878dff520ee2e424b088a963c8f6417f5106ce9 (patch) | |
| tree | df094ec09d8b26bac56c08d1408a2fab35ac9e7d /src/srht_contrib/api | |
| parent | acbff854f2da96bddcaede1385e7fefeba0fb34b (diff) | |
| download | hutch-stats-1878dff520ee2e424b088a963c8f6417f5106ce9.tar.gz hutch-stats-1878dff520ee2e424b088a963c8f6417f5106ce9.tar.bz2 hutch-stats-1878dff520ee2e424b088a963c8f6417f5106ce9.zip | |
feat: harden contribution api for production use
Diffstat (limited to 'src/srht_contrib/api')
| -rw-r--r-- | src/srht_contrib/api/routes_contributions.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/srht_contrib/api/routes_contributions.py b/src/srht_contrib/api/routes_contributions.py index 0682aa6..c682553 100644 --- a/src/srht_contrib/api/routes_contributions.py +++ b/src/srht_contrib/api/routes_contributions.py @@ -13,7 +13,7 @@ from srht_contrib.services.srht_client import SourceHutClientError from srht_contrib.utils.dates import parse_date, year_bounds from srht_contrib.utils.identity import ActorIdentityResolver -router = APIRouter(prefix="/api/contributions", tags=["contributions"], dependencies=[Depends(require_api_key)]) +router = APIRouter(prefix="/api/contributions", tags=["contributions"]) def _resolve_range(year: int | None, from_date: str | None, to_date: str | None) -> tuple[date, date]: @@ -63,7 +63,7 @@ def get_contribution_stats( return ContributionAggregator().build_stats(db, canonical_actor, start, end) [email protected]("/poll", response_model=PollResponse) [email protected]("/poll", response_model=PollResponse, dependencies=[Depends(require_api_key)]) def trigger_manual_poll( actor: str, poller: PollerService = Depends(get_poller), |
