Drying out
This commit is contained in:
@@ -36,7 +36,7 @@ async def read_active_session(session: AsyncSession = Depends(get_session)):
|
||||
from app.crud import get_active_session
|
||||
|
||||
active = await get_active_session(session)
|
||||
return {"session": active}
|
||||
return await get_active_session(session)
|
||||
|
||||
|
||||
@router.get("", response_model=SessionListResponse)
|
||||
@@ -87,7 +87,7 @@ async def delete_session_endpoint(
|
||||
return None
|
||||
|
||||
|
||||
@router.put("/{session_id}", response_model=None)
|
||||
@router.patch("/{session_id}", response_model=SleepSessionRead)
|
||||
async def update_session_endpoint(
|
||||
session_id: int,
|
||||
payload: SleepSessionUpdate,
|
||||
|
||||
Reference in New Issue
Block a user