Skip to content
Snippets Groups Projects
Commit 3437eb81 authored by Aymeric Chaumont's avatar Aymeric Chaumont
Browse files

added route for waiting time

parent 11e92319
Branches
No related tags found
1 merge request!5Waiting time component
This commit is part of merge request !5. Comments created here will be created in the context of that merge request.
from datetime import timedelta
from typing import List
from fastapi import Body, Depends, FastAPI
from fastapi.middleware.cors import CORSMiddleware
......@@ -50,6 +51,11 @@ async def post(record: schemas.RecordBase = Body(...), db: Session = Depends(get
return crud.create_record(record, db)
@app.get('/api/{place}/waiting_time', response_model=timedelta)
async def waiting_time(place: str, db: Session = Depends(get_db)):
return crud.get_waiting_time(place, db)
"""
import cv2
import numpy as np
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment