mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
add missing requests/responses
This commit is contained in:
parent
f0c3581d26
commit
4b5f66d497
27 changed files with 382 additions and 10 deletions
17
webclient/src/websocket/commands/session/deckDownload.ts
Normal file
17
webclient/src/websocket/commands/session/deckDownload.ts
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
import { create } from '@bufbuild/protobuf';
|
||||
import { WebClient } from '../../WebClient';
|
||||
|
||||
import { Data } from '@app/types';
|
||||
|
||||
export function deckDownload(deckId: number): void {
|
||||
WebClient.instance.protobuf.sendSessionCommand(
|
||||
Data.Command_DeckDownload_ext,
|
||||
create(Data.Command_DeckDownloadSchema, { deckId }),
|
||||
{
|
||||
responseExt: Data.Response_DeckDownload_ext,
|
||||
onSuccess: (response) => {
|
||||
WebClient.instance.response.session.downloadServerDeck(deckId, response);
|
||||
},
|
||||
}
|
||||
);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue