feat: DELETE /api/v3/chats/:roomId/users and DELETE /api/v3/chats/:roomId/users/:uid

This commit is contained in:
Julian Lam
2021-12-22 09:58:52 -05:00
parent 6294beea0b
commit fe17c94c35
9 changed files with 121 additions and 19 deletions

View File

@@ -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 = {};