fastapi添加修改备注接口

This commit is contained in:
evilbeast 2022-09-20 09:29:09 +08:00
parent f7ba8fdbbf
commit 476e8428cb
2 changed files with 15 additions and 0 deletions

View File

@ -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)

View File

@ -145,3 +145,9 @@ class SendPatReqModel(ClientReqModel):
room_wxid: str
patted_wxid: str
class ModifyFriendRemarkReqModel(ClientReqModel):
wxid: str
remark: str