mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
17 lines
516 B
TypeScript
17 lines
516 B
TypeScript
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);
|
|
},
|
|
}
|
|
);
|
|
}
|