mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
Updating Session Persistence with all valid persistence calls (#5085)
* Updating Session Persistence with all valid persistence calls * Spacing fixes --------- Co-authored-by: Zach H <zahalpern+github@gmail.com>
This commit is contained in:
parent
ef4413633a
commit
cf1f4f12a9
8 changed files with 193 additions and 26 deletions
|
|
@ -1,7 +1,9 @@
|
|||
import webClient from '../../WebClient';
|
||||
import { SessionPersistence } from '../../persistence';
|
||||
import { common } from 'protobufjs';
|
||||
import IBytesValue = common.IBytesValue;
|
||||
|
||||
export function accountImage(image: unknown): void {
|
||||
export function accountImage(image: IBytesValue): void {
|
||||
const command = webClient.protobuf.controller.Command_AccountImage.create({ image });
|
||||
const sc = webClient.protobuf.controller.SessionCommand.create({ '.Command_AccountImage.ext': command });
|
||||
|
||||
|
|
@ -10,7 +12,7 @@ export function accountImage(image: unknown): void {
|
|||
|
||||
switch (responseCode) {
|
||||
case webClient.protobuf.controller.Response.ResponseCode.RespOk:
|
||||
SessionPersistence.accountImageChanged();
|
||||
SessionPersistence.accountImageChanged(image);
|
||||
break;
|
||||
case webClient.protobuf.controller.Response.ResponseCode.RespFunctionNotAllowed:
|
||||
console.log('Not allowed');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue