mirror of
https://github.com/balena-io/etcher.git
synced 2025-07-19 09:16:38 +00:00
Cleaning-up EtcherPro specific code
This commit is contained in:
parent
d25eda9a7d
commit
45f6ee667d
@ -16,6 +16,12 @@
|
|||||||
|
|
||||||
import { Dictionary } from 'lodash';
|
import { Dictionary } from 'lodash';
|
||||||
|
|
||||||
|
type BalenaTag = {
|
||||||
|
id: number,
|
||||||
|
name: string,
|
||||||
|
value: string
|
||||||
|
}
|
||||||
|
|
||||||
export class EtcherPro {
|
export class EtcherPro {
|
||||||
private supervisorAddr: string;
|
private supervisorAddr: string;
|
||||||
private supervisorKey: string;
|
private supervisorKey: string;
|
||||||
@ -38,12 +44,12 @@ export class EtcherPro {
|
|||||||
if (parsed['status'] === 'success') {
|
if (parsed['status'] === 'success') {
|
||||||
return Object.assign(
|
return Object.assign(
|
||||||
{},
|
{},
|
||||||
...parsed['tags'].map((tag: any) => {
|
...parsed['tags'].map((tag: BalenaTag) => {
|
||||||
return { [tag.name]: tag['value'] };
|
return { [tag.name]: tag.value };
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
return await {};
|
return {};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user