mirror of
https://github.com/smallevilbeast/ntchat.git
synced 2026-07-02 03:16:21 +08:00
新增退出群接口
This commit is contained in:
@@ -161,6 +161,14 @@ async def add_room_friend(model: models.ModifyRoomNameReqModel):
|
||||
return response_json(1, data)
|
||||
|
||||
|
||||
@app.post("/room/quit_room", summary="退出群", tags=["Room"],
|
||||
response_model=models.ResponseModel)
|
||||
@catch_exception()
|
||||
async def quit_room(model: models.RoomReqModel):
|
||||
data = client_mgr.get_client(model.guid).quit_room(model.room_wxid)
|
||||
return response_json(1, data)
|
||||
|
||||
|
||||
@app.post("/msg/send_text", summary="发送文本消息", tags=["Msg"], response_model=models.ResponseModel)
|
||||
@catch_exception()
|
||||
async def msg_send_text(model: models.SendTextReqModel):
|
||||
|
||||
@@ -101,8 +101,11 @@ class AddRoomFriendReqModel(ClientReqModel):
|
||||
verify: str
|
||||
|
||||
|
||||
class ModifyRoomNameReqModel(ClientReqModel):
|
||||
class RoomReqModel(ClientReqModel):
|
||||
room_wxid: str
|
||||
|
||||
|
||||
class ModifyRoomNameReqModel(RoomReqModel):
|
||||
name: str
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user