Skip to content

Commit bbb27e6

Browse files
committed
feat: async disk mapping
1 parent 933575f commit bbb27e6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

api/src/core/modules/get-disks.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,9 @@ export const getDisks = async (options?: { temperature: boolean }): Promise<Disk
8282
const partitions = await blockDevices().then((devices) =>
8383
devices.filter((device) => device.type === 'part')
8484
);
85-
const disks = await asyncMap(await diskLayout(), async (disk) => parseDisk(disk, partitions, true));
85+
const disks = await Promise.all(
86+
(await diskLayout()).map((disk) => parseDisk(disk, partitions, true))
87+
);
8688

8789
return disks;
8890
};

0 commit comments

Comments
 (0)