Skip to content

Commit

Permalink
fix: normalize return for Controller.getAvailableFirmwareUpdates
Browse files Browse the repository at this point in the history
  • Loading branch information
raman325 committed Oct 6, 2023
1 parent 303029b commit 1ab0d13
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@ export async function getAvailableFirmwareUpdates(
return result.map((update) => ({
device: deviceId,
...update,
channel: update.channel ?? "stable",
}));
}

Expand Down
3 changes: 1 addition & 2 deletions packages/zwave-js/src/lib/controller/_Types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ export type FirmwareUpdateDeviceID = Expand<
export interface FirmwareUpdateServiceResponse {
version: string;
changelog: string;
/** When using the V1 API, channel is not returned and should be assumed to be stable */
channel?: "stable" | "beta";
channel: "stable" | "beta";
files: FirmwareUpdateFileInfo[];
downgrade: boolean;
normalizedVersion: string;
Expand Down

0 comments on commit 1ab0d13

Please sign in to comment.