mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
refactor redux data model
This commit is contained in:
parent
ae1bc3da38
commit
0ff391491d
243 changed files with 5212 additions and 5963 deletions
37
webclient/src/api/request/ModeratorRequestImpl.ts
Normal file
37
webclient/src/api/request/ModeratorRequestImpl.ts
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
import { Data } from '@app/types';
|
||||
import type { IModeratorRequest } from '@app/websocket';
|
||||
import { ModeratorCommands } from '@app/websocket';
|
||||
|
||||
export class ModeratorRequestImpl implements IModeratorRequest {
|
||||
banFromServer(
|
||||
minutes: number,
|
||||
userName?: string,
|
||||
address?: string,
|
||||
reason?: string,
|
||||
visibleReason?: string,
|
||||
clientid?: string,
|
||||
removeMessages?: number
|
||||
): void {
|
||||
ModeratorCommands.banFromServer(minutes, userName, address, reason, visibleReason, clientid, removeMessages);
|
||||
}
|
||||
|
||||
getBanHistory(userName: string): void {
|
||||
ModeratorCommands.getBanHistory(userName);
|
||||
}
|
||||
|
||||
getWarnHistory(userName: string): void {
|
||||
ModeratorCommands.getWarnHistory(userName);
|
||||
}
|
||||
|
||||
getWarnList(modName: string, userName: string, userClientid: string): void {
|
||||
ModeratorCommands.getWarnList(modName, userName, userClientid);
|
||||
}
|
||||
|
||||
viewLogHistory(filters: Data.ViewLogHistoryParams): void {
|
||||
ModeratorCommands.viewLogHistory(filters);
|
||||
}
|
||||
|
||||
warnUser(userName: string, reason: string, clientid?: string, removeMessages?: number): void {
|
||||
ModeratorCommands.warnUser(userName, reason, clientid, removeMessages);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue