mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-09 15:54: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_ListUsers_ext, Command_ListUsersSchema } from 'generated/proto/session_commands_pb';
|
||||
|
||||
import { SessionPersistence } from '../../persistence';
|
||||
import { Response_ListUsers_ext } from 'generated/proto/response_list_users_pb';
|
||||
import { Data } from '@app/types';
|
||||
|
||||
export function listUsers(): void {
|
||||
webClient.protobuf.sendSessionCommand(Command_ListUsers_ext, create(Command_ListUsersSchema), {
|
||||
responseExt: Response_ListUsers_ext,
|
||||
webClient.protobuf.sendSessionCommand(Data.Command_ListUsers_ext, create(Data.Command_ListUsersSchema), {
|
||||
responseExt: Data.Response_ListUsers_ext,
|
||||
onSuccess: (response) => {
|
||||
SessionPersistence.updateUsers(response.userList);
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue