mirror of
https://github.com/unraid/api.git
synced 2025-12-31 13:39:52 -06:00
feat: async disk mapping
This commit is contained in:
@@ -82,7 +82,9 @@ export const getDisks = async (options?: { temperature: boolean }): Promise<Disk
|
||||
const partitions = await blockDevices().then((devices) =>
|
||||
devices.filter((device) => device.type === 'part')
|
||||
);
|
||||
const disks = await asyncMap(await diskLayout(), async (disk) => parseDisk(disk, partitions, true));
|
||||
const disks = await Promise.all(
|
||||
(await diskLayout()).map((disk) => parseDisk(disk, partitions, true))
|
||||
);
|
||||
|
||||
return disks;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user