mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-02-17 20:17:40 +01:00
feat: DELETE /api/v3/chats/:roomId/users and DELETE /api/v3/chats/:roomId/users/:uid
This commit is contained in:
@@ -70,7 +70,22 @@ Chats.invite = async (req, res) => {
|
||||
};
|
||||
|
||||
Chats.kick = async (req, res) => {
|
||||
// ...
|
||||
const users = await api.chats.kick(req, {
|
||||
...req.body,
|
||||
roomId: req.params.roomId,
|
||||
});
|
||||
|
||||
helpers.formatApiResponse(200, res, users);
|
||||
};
|
||||
|
||||
Chats.kickUser = async (req, res) => {
|
||||
req.body.uids = [req.params.uid];
|
||||
const users = await api.chats.kick(req, {
|
||||
...req.body,
|
||||
roomId: req.params.roomId,
|
||||
});
|
||||
|
||||
helpers.formatApiResponse(200, res, users);
|
||||
};
|
||||
|
||||
Chats.messages = {};
|
||||
|
||||
Reference in New Issue
Block a user