mirror of
https://github.com/smallevilbeast/ntchat.git
synced 2025-05-23 03:06:07 +08:00
fastapi添加修改备注接口
This commit is contained in:
parent
f7ba8fdbbf
commit
476e8428cb
|
@ -92,6 +92,13 @@ async def get_contact_detail(model: models.ContactDetailReqModel):
|
|||
return response_json(1, data)
|
||||
|
||||
|
||||
@app.post("/contact/modify_remark", summary="修改联系人备注", tags=["Contact"], response_model=models.ResponseModel)
|
||||
@catch_exception()
|
||||
async def send_gif(model: models.ModifyFriendRemarkReqModel):
|
||||
data = client_mgr.get_client(model.guid).modify_friend_remark(model.wxid, model.remark)
|
||||
return response_json(1, data)
|
||||
|
||||
|
||||
@app.post("/room/get_rooms", summary="获取群列表", tags=["Room"],
|
||||
response_model=models.ResponseModel)
|
||||
@catch_exception()
|
||||
|
@ -256,5 +263,7 @@ async def send_gif(model: models.SendPatReqModel):
|
|||
return response_json(1, data)
|
||||
|
||||
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
uvicorn.run(app=app, host='0.0.0.0', port=8000)
|
||||
|
|
|
@ -145,3 +145,9 @@ class SendPatReqModel(ClientReqModel):
|
|||
room_wxid: str
|
||||
patted_wxid: str
|
||||
|
||||
|
||||
class ModifyFriendRemarkReqModel(ClientReqModel):
|
||||
wxid: str
|
||||
remark: str
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user