mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-06 13:33:55 -07:00
refactor redux data model
This commit is contained in:
parent
ae1bc3da38
commit
0ff391491d
243 changed files with 5212 additions and 5963 deletions
|
|
@ -1,15 +1,13 @@
|
|||
import { create } from '@bufbuild/protobuf';
|
||||
import { Data } from '@app/types';
|
||||
import webClient from '../../WebClient';
|
||||
import { AdminPersistence } from '../../persistence';
|
||||
|
||||
import { WebClient } from '../../WebClient';
|
||||
export function adjustMod(userName: string, shouldBeMod?: boolean, shouldBeJudge?: boolean): void {
|
||||
webClient.protobuf.sendAdminCommand(
|
||||
WebClient.instance.protobuf.sendAdminCommand(
|
||||
Data.Command_AdjustMod_ext,
|
||||
create(Data.Command_AdjustModSchema, { userName, shouldBeMod, shouldBeJudge }),
|
||||
{
|
||||
onSuccess: () => {
|
||||
AdminPersistence.adjustMod(userName, shouldBeMod, shouldBeJudge);
|
||||
WebClient.instance.response.admin.adjustMod(userName, shouldBeMod, shouldBeJudge);
|
||||
},
|
||||
}
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue