Skip to content

Commit

Permalink
mod: renommae /zones/all/categorie => /zones/categories
Browse files Browse the repository at this point in the history
  • Loading branch information
herve.le-bars committed Nov 22, 2024
1 parent 51b94f9 commit 6b8ccf5
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions backend/bloom/routers/v1/zones.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,16 +58,15 @@ async def list_zones_summary(request: Request,
return result


@router.get("/zones/all/categories")
@router.get("/zones/categories")
@cache
async def list_zone_categories(request: Request, nocache: bool = False, key: str = Depends(X_API_KEY_HEADER)):
check_apikey(key)
use_cases = UseCases()
zone_repository = use_cases.zone_repository()
db = use_cases.db()
with db.session() as session:
json_data = [ZoneListView(**z.model_dump_json())
for z in zone_repository.get_all_zone_categories(session)]
json_data = [z for z in zone_repository.get_all_zone_categories(session)]
return json_data


Expand Down

0 comments on commit 6b8ccf5

Please sign in to comment.