fooder-api/fooder/view/diary.py
Piotr Domański e2af49046c
All checks were successful
Python lint and test / linttest (push) Successful in 5m30s
[isort] ran with black profile
2024-08-04 16:17:16 +02:00

17 lines
371 B
Python

from datetime import date
from fastapi import APIRouter, Depends, Request
from ..controller.diary import GetDiary
from ..model.diary import Diary
router = APIRouter(tags=["diary"])
@router.get("", response_model=Diary)
async def get_diary(
request: Request,
date: date,
controller: GetDiary = Depends(GetDiary),
):
return await controller.call(date)