From 45f6ee667d1b2b72e66c6d726651edea79ac329a Mon Sep 17 00:00:00 2001 From: Aurelien VALADE Date: Thu, 12 Jan 2023 14:52:08 +0100 Subject: [PATCH] Cleaning-up EtcherPro specific code --- lib/gui/app/utils/etcher-pro-specific.ts | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/lib/gui/app/utils/etcher-pro-specific.ts b/lib/gui/app/utils/etcher-pro-specific.ts index afe6e4aa..f59a2f32 100644 --- a/lib/gui/app/utils/etcher-pro-specific.ts +++ b/lib/gui/app/utils/etcher-pro-specific.ts @@ -16,6 +16,12 @@ import { Dictionary } from 'lodash'; +type BalenaTag = { + id: number, + name: string, + value: string +} + export class EtcherPro { private supervisorAddr: string; private supervisorKey: string; @@ -38,12 +44,12 @@ export class EtcherPro { if (parsed['status'] === 'success') { return Object.assign( {}, - ...parsed['tags'].map((tag: any) => { - return { [tag.name]: tag['value'] }; + ...parsed['tags'].map((tag: BalenaTag) => { + return { [tag.name]: tag.value }; }), ); } else { - return await {}; + return {}; } }