mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-10 00:04:48 -07:00
refactor typescript wiring
This commit is contained in:
parent
cea9ae62d8
commit
c62c336a11
286 changed files with 2999 additions and 3053 deletions
|
|
@ -1,13 +1,13 @@
|
|||
import { create } from '@bufbuild/protobuf';
|
||||
import webClient from '../../WebClient';
|
||||
import { Command_ViewLogHistory_ext, Command_ViewLogHistorySchema } from 'generated/proto/moderator_commands_pb';
|
||||
import { ModeratorPersistence } from '../../persistence';
|
||||
import { Response_ViewLogHistory_ext } from 'generated/proto/response_viewlog_history_pb';
|
||||
import { LogFilters } from 'types';
|
||||
|
||||
export function viewLogHistory(filters: LogFilters): void {
|
||||
webClient.protobuf.sendModeratorCommand(Command_ViewLogHistory_ext, create(Command_ViewLogHistorySchema, filters), {
|
||||
responseExt: Response_ViewLogHistory_ext,
|
||||
import { ModeratorPersistence } from '../../persistence';
|
||||
|
||||
import { Data } from '@app/types';
|
||||
|
||||
export function viewLogHistory(filters: Data.ViewLogHistoryParams): void {
|
||||
webClient.protobuf.sendModeratorCommand(Data.Command_ViewLogHistory_ext, create(Data.Command_ViewLogHistorySchema, filters), {
|
||||
responseExt: Data.Response_ViewLogHistory_ext,
|
||||
onSuccess: (response) => {
|
||||
ModeratorPersistence.viewLogs(response.logMessage);
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue