mirror of
https://github.com/unraid/api.git
synced 2026-01-01 14:10:10 -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) =>
|
const partitions = await blockDevices().then((devices) =>
|
||||||
devices.filter((device) => device.type === 'part')
|
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;
|
return disks;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user