From 769b1cbae92374a17dc7631229eaaf8604d6bcc4 Mon Sep 17 00:00:00 2001 From: Jeremy Clements <79224539+jeclrsg@users.noreply.github.com> Date: Mon, 16 Oct 2023 17:08:46 -0400 Subject: [PATCH] fix(comms): extend FileSpray.DFUWUFile to change reponse type to not be JSON consistent with WsWorkunits.WUFile Signed-off-by: Jeremy Clements <79224539+jeclrsg@users.noreply.github.com> --- packages/comms/src/ecl/dfuWorkunit.ts | 8 ++++---- packages/comms/src/services/fileSpray.ts | 4 ++++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/packages/comms/src/ecl/dfuWorkunit.ts b/packages/comms/src/ecl/dfuWorkunit.ts index f80a4468e3..f30f1f3cbb 100644 --- a/packages/comms/src/ecl/dfuWorkunit.ts +++ b/packages/comms/src/ecl/dfuWorkunit.ts @@ -214,7 +214,7 @@ export class DFUWorkunit extends StateObject { + fetchXML(callback?: void): Promise { return this.DFUWUFile(); } @@ -239,14 +239,14 @@ export class DFUWorkunit extends StateObject = {}): Promise { - return this.connection.DFUWUFile({ + protected DFUWUFile(_request: Partial = {}): Promise { + return this.connection.DFUWUFileEx({ ..._request, Wuid: this.ID }).then(response => { //TODO: additional processing? return response; }).catch((e: ESPExceptions) => { - return {} as FileSpray.DFUWUFileResponse; + return ""; }); } diff --git a/packages/comms/src/services/fileSpray.ts b/packages/comms/src/services/fileSpray.ts index 2922d202ac..128e761fc8 100644 --- a/packages/comms/src/services/fileSpray.ts +++ b/packages/comms/src/services/fileSpray.ts @@ -13,6 +13,10 @@ export interface UpdateDFUWorkunitEx extends UpdateDFUWorkunitMinusWU { export class FileSprayService extends FileSprayServiceBase { + DFUWUFileEx(request: FileSpray.DFUWUFileRequest): Promise { + return this._connection.send("DFUWUFile", request, "text"); + } + SprayFixedEx(request: Partial): Promise { return this._connection.send("SprayFixed", request); }