diff --git a/fastapi_example/main.py b/fastapi_example/main.py index 8b3c5b2..b9d1987 100644 --- a/fastapi_example/main.py +++ b/fastapi_example/main.py @@ -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) diff --git a/fastapi_example/models.py b/fastapi_example/models.py index 3a248c5..e1f1e30 100644 --- a/fastapi_example/models.py +++ b/fastapi_example/models.py @@ -145,3 +145,9 @@ class SendPatReqModel(ClientReqModel): room_wxid: str patted_wxid: str + +class ModifyFriendRemarkReqModel(ClientReqModel): + wxid: str + remark: str + +