mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-15 10:16:12 +01:00
feat: DELETE /api/v3/chats/:roomId/users and DELETE /api/v3/chats/:roomId/users/:uid
This commit is contained in:
@@ -264,16 +264,9 @@ define('forum/chats', [
|
||||
modal.on('click', '[data-action="kick"]', function () {
|
||||
const uid = parseInt(this.getAttribute('data-uid'), 10);
|
||||
|
||||
socket.emit('modules.chats.removeUserFromRoom', {
|
||||
roomId: roomId,
|
||||
uid: uid,
|
||||
}, function (err) {
|
||||
if (err) {
|
||||
return alerts.error(err);
|
||||
}
|
||||
|
||||
Chats.refreshParticipantsList(roomId, modal);
|
||||
});
|
||||
api.delete(`/chats/${roomId}/users/${uid}`, {}).then((body) => {
|
||||
Chats.refreshParticipantsList(roomId, modal, body);
|
||||
}).catch(alerts.error);
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user