fix(relationship): 500 when adding friends

This commit is contained in:
MingxuanGame
2025-08-10 11:31:18 +00:00
parent 30725422f4
commit f60c451c96

View File

@@ -96,7 +96,9 @@ async def add_relationship(
) )
).first() ).first()
assert relationship, "Relationship should exist after commit" assert relationship, "Relationship should exist after commit"
return await RelationshipResp.from_db(db, relationship) return AddFriendResp(
user_relation=await RelationshipResp.from_db(db, relationship)
)
@router.delete("/friends/{target}", tags=["relationship"]) @router.delete("/friends/{target}", tags=["relationship"])