mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
WebClient: refactor protobuf method structure (#5014)
This commit is contained in:
parent
f174614496
commit
be5d42baba
53 changed files with 1014 additions and 1263 deletions
18
webclient/src/websocket/events/session/removeFromList.ts
Normal file
18
webclient/src/websocket/events/session/removeFromList.ts
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
import { SessionPersistence } from '../../persistence';
|
||||
import { RemoveFromListData } from './interfaces';
|
||||
|
||||
export function removeFromList({ listName, userName }: RemoveFromListData) {
|
||||
switch (listName) {
|
||||
case 'buddy': {
|
||||
SessionPersistence.removeFromBuddyList(userName);
|
||||
break;
|
||||
}
|
||||
case 'ignore': {
|
||||
SessionPersistence.removeFromIgnoreList(userName);
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
console.log(`Attempted to remove from unknown list: ${listName}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue