mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
Webatrice admin commands (#5051)
* Add AdminCommand.updateServerMessage * Add AdminCommand.shutdownServer * Add AdminCommand.reloadConfig * Cleanup * Add AdminCommand.adjustMod * Lint * Lint
This commit is contained in:
parent
e45c4042fe
commit
34d70980e8
11 changed files with 167 additions and 0 deletions
19
webclient/src/api/AdminService.tsx
Normal file
19
webclient/src/api/AdminService.tsx
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
import { AdminCommands } from 'websocket';
|
||||
|
||||
export default class AdminService {
|
||||
static adjustMod(userName: string, shouldBeMod?: boolean, shouldBeJudge?: boolean): void {
|
||||
AdminCommands.adjustMod(userName, shouldBeMod, shouldBeJudge);
|
||||
}
|
||||
|
||||
static reloadConfig(): void {
|
||||
AdminCommands.reloadConfig();
|
||||
}
|
||||
|
||||
static shutdownServer(reason: string, minutes: number): void {
|
||||
AdminCommands.shutdownServer(reason, minutes);
|
||||
}
|
||||
|
||||
static updateServerMessage(): void {
|
||||
AdminCommands.updateServerMessage();
|
||||
}
|
||||
}
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
export { default as AdminService } from './AdminService';
|
||||
export { default as AuthenticationService } from './AuthenticationService';
|
||||
export { default as ModeratorService } from './ModeratorService';
|
||||
export { default as RoomsService } from './RoomsService';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue