mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-12 00:54:53 -07:00
refactor web socket layer
This commit is contained in:
parent
19f5eefdd2
commit
141f0e59f5
124 changed files with 927 additions and 853 deletions
|
|
@ -2,8 +2,8 @@ import { ForgotPasswordChallengeParams } from 'store';
|
|||
import { StatusEnum, WebSocketConnectOptions } from 'types';
|
||||
|
||||
import { create } from '@bufbuild/protobuf';
|
||||
import { CLIENT_CONFIG } from '../../config';
|
||||
import webClient from '../../WebClient';
|
||||
import { BackendService } from '../../services/BackendService';
|
||||
import {
|
||||
Command_ForgotPasswordChallenge_ext, Command_ForgotPasswordChallengeSchema,
|
||||
} from 'generated/proto/session_commands_pb';
|
||||
|
|
@ -13,8 +13,8 @@ import { disconnect, updateStatus } from './';
|
|||
export function forgotPasswordChallenge(options: WebSocketConnectOptions): void {
|
||||
const { userName, email } = options as unknown as ForgotPasswordChallengeParams;
|
||||
|
||||
BackendService.sendSessionCommand(Command_ForgotPasswordChallenge_ext, create(Command_ForgotPasswordChallengeSchema, {
|
||||
...webClient.clientConfig,
|
||||
webClient.protobuf.sendSessionCommand(Command_ForgotPasswordChallenge_ext, create(Command_ForgotPasswordChallengeSchema, {
|
||||
...CLIENT_CONFIG,
|
||||
userName,
|
||||
email,
|
||||
}), {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue