pyronear / pyro-api

Alert Management API for wildfire prevention, detection & monitoring. Built with FastAPI & PostgreSQL
Apache License 2.0
21 stars 9 forks source link

Fix :the admin behavior for bucket requests #343

Closed RonanMorgan closed 4 months ago

RonanMorgan commented 4 months ago

If you are connected as an admin, the bucket par defaut is "admin" but the endpoint Detection was using the "alert-api-1" name.

Anyway we should not use any of this two solutions when requesting for an URL, we need to use the Detection_id instead

codecov[bot] commented 4 months ago

Codecov Report

Attention: Patch coverage is 60.00000% with 2 lines in your changes missing coverage. Please review.

Please upload report for BASE (rs/use-organization-bucket@5c492a5). Learn more about missing BASE report.

Files Patch % Lines
src/app/api/api_v1/endpoints/detections.py 75.00% 1 Missing :warning:
src/app/services/storage.py 0.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## rs/use-organization-bucket #343 +/- ## ============================================================= Coverage ? 82.88% ============================================================= Files ? 31 Lines ? 818 Branches ? 0 ============================================================= Hits ? 678 Misses ? 140 Partials ? 0 ``` | [Flag](https://app.codecov.io/gh/pyronear/pyro-api/pull/343/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pyronear) | Coverage Δ | | |---|---|---| | [backend](https://app.codecov.io/gh/pyronear/pyro-api/pull/343/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pyronear) | `82.98% <60.00%> (?)` | | | [client](https://app.codecov.io/gh/pyronear/pyro-api/pull/343/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pyronear) | `81.66% <ø> (?)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pyronear#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

frgfm commented 4 months ago

I'm a bit lost here: would it be possible to directly put those commits in the bucket/org PR?