Skip to content

Commit

Permalink
chore: require auth for bookings list
Browse files Browse the repository at this point in the history
  • Loading branch information
ArtemSBulgakov committed Oct 24, 2024
1 parent 1793d8b commit 83227ae
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/modules/bookings/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

@router.get("/bookings/")
async def bookings(
_: VerifiedDep,
start: datetime.datetime = Query(example=_now.isoformat(timespec="minutes")),
end: datetime.datetime = Query(example=(_now + timedelta(hours=9)).isoformat(timespec="minutes")),
) -> list[Booking]:
Expand Down
3 changes: 2 additions & 1 deletion src/modules/rooms/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@

from fastapi import APIRouter

from src.api.dependencies import VerifiedDep
from src.config_schema import Room
from src.modules.rooms.repository import room_repository

router = APIRouter(tags=["Rooms"])


@router.get("/rooms/")
async def rooms() -> list[Room]:
async def rooms(_: VerifiedDep) -> list[Room]:
return room_repository.get_all()

0 comments on commit 83227ae

Please sign in to comment.