11 lines
352 B
Python
11 lines
352 B
Python
from fastapi import APIRouter, Depends
|
|
from typing import List
|
|
from schemas.booking import BookingSchema
|
|
from helpers.booking_helpers import get_all_bookings
|
|
from db import Session, get_db
|
|
|
|
router = APIRouter()
|
|
|
|
@router.get("/booking", response_model=List[BookingSchema])
|
|
def get_bookings(db: Session = Depends(get_db)):
|
|
return get_all_bookings(db) |