feat: add Today environment summary
This commit is contained in:
@@ -69,6 +69,7 @@ from .schemas import (
|
||||
UserOut,
|
||||
UserUpdate,
|
||||
)
|
||||
from .today_environment import get_environment as get_today_environment
|
||||
|
||||
|
||||
@asynccontextmanager
|
||||
@@ -195,6 +196,11 @@ async def me(user: User = Depends(current_user)):
|
||||
return user
|
||||
|
||||
|
||||
@app.get("/api/v1/today/environment")
|
||||
async def today_environment(_: User = Depends(current_user)):
|
||||
return await get_today_environment()
|
||||
|
||||
|
||||
@app.patch("/api/v1/me", response_model=UserOut)
|
||||
async def update_me(
|
||||
payload: UserUpdate,
|
||||
|
||||
Reference in New Issue
Block a user