1.7
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user