This commit is contained in:
2026-06-14 09:25:59 +08:00
parent a0f441d8ae
commit 6fbf610277
39 changed files with 2492 additions and 2 deletions
+11
View File
@@ -43,3 +43,14 @@ async def water_tree(
return await service.water(user.id, friend_id)
except ValueError as e:
raise HTTPException(status_code=400, detail=str(e))
@router.get("/{friend_id}/heartbeat")
async def get_heartbeat(
friend_id: str,
user: User = Depends(get_current_user),
db: AsyncSession = Depends(get_db),
):
"""获取心跳同步数据"""
service = TreeService(db)
return await service.get_heartbeat(user.id, friend_id)