mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-11 00:24:47 -07:00
refactor typescript wiring
This commit is contained in:
parent
cea9ae62d8
commit
c62c336a11
286 changed files with 2999 additions and 3053 deletions
|
|
@ -1,12 +1,12 @@
|
|||
import { create } from '@bufbuild/protobuf';
|
||||
import webClient from '../../WebClient';
|
||||
import { Command_GetWarnHistory_ext, Command_GetWarnHistorySchema } from 'generated/proto/moderator_commands_pb';
|
||||
|
||||
import { ModeratorPersistence } from '../../persistence';
|
||||
import { Response_WarnHistory_ext } from 'generated/proto/response_warn_history_pb';
|
||||
import { Data } from '@app/types';
|
||||
|
||||
export function getWarnHistory(userName: string): void {
|
||||
webClient.protobuf.sendModeratorCommand(Command_GetWarnHistory_ext, create(Command_GetWarnHistorySchema, { userName }), {
|
||||
responseExt: Response_WarnHistory_ext,
|
||||
webClient.protobuf.sendModeratorCommand(Data.Command_GetWarnHistory_ext, create(Data.Command_GetWarnHistorySchema, { userName }), {
|
||||
responseExt: Data.Response_WarnHistory_ext,
|
||||
onSuccess: (response) => {
|
||||
ModeratorPersistence.warnHistory(userName, response.warnList);
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue