Skip to content
Snippets Groups Projects
Commit f4256b26 authored by Stefan Plociennik's avatar Stefan Plociennik
Browse files

implements remove word from blacklist now removes from room

parent 87fb9427
No related merge requests found
......@@ -122,7 +122,21 @@ export class TopicCloudAdminService {
}
removeWordFromBlacklist(word: string) {
this.blacklist.splice(this.blacklist.indexOf(word), 1);
let updatedRoom: Room;
this.roomService.getRoom(localStorage.getItem('roomId')).subscribe(room => {
updatedRoom = room;
updatedRoom.blacklist = JSON.stringify(this.getBlacklist().splice(this.blacklist.indexOf(word), 1));
this.roomService.updateRoom(updatedRoom).subscribe(_ => {
this.translateService.get('room-page.changes-successful').subscribe(msg => {
this.notificationService.show(msg);
});
},
error => {
this.translateService.get('room-page.changes-gone-wrong').subscribe(msg => {
this.notificationService.show(msg);
});
});
});
}
updateRoomBlacklist() {
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment