diff --git a/Dockerfile b/Dockerfile index c033c74..edb7491 100644 --- a/Dockerfile +++ b/Dockerfile @@ -23,4 +23,4 @@ RUN poetry install --no-interaction --no-cache --without dev # Run app COPY src /code/src -CMD ["poetry", "run", "uvicorn", "main:app", "--proxy-headers", "--host", "0.0.0.0", "--port", "80"] +CMD ["poetry", "run", "uvicorn", "src.main:app", "--proxy-headers", "--host", "0.0.0.0", "--port", "80"] diff --git a/devstart.py b/devstart.py index 986d535..28ff93d 100644 --- a/devstart.py +++ b/devstart.py @@ -3,4 +3,4 @@ if __name__ == "__main__": load_dotenv() - uvicorn.run("main:app", host="localhost", port=8000, reload=True) + uvicorn.run("src.main:app", host="localhost", port=8000, reload=True) diff --git a/src/mtr/router.py b/src/mtr/router.py index 8e33da8..a5798e0 100644 --- a/src/mtr/router.py +++ b/src/mtr/router.py @@ -103,7 +103,7 @@ def raw_mtr_by_date( return FileResponse(path) -@router.get("/metadata/mtr", response_model=schemas.MtrMetadata, include_in_schema=False) +@router.get("/metadata/mtr", include_in_schema=False) def mtr_metadata(db: Session = Depends(get_db)): meta = service.get_mtr_metadata(db) - return {"data": meta} + return {"data": [{"creationDay": d} for d in meta]}