|
|
|
@ -23,10 +23,16 @@ export const getAnvilSummary: RequestHandler<unknown, AnvilSummary> = async ( |
|
|
|
|
const { anvil_uuid: alist } = anvils; |
|
|
|
|
const result: AnvilSummary = { anvils: [] }; |
|
|
|
|
|
|
|
|
|
for (const auuid of Object.keys(alist)) { |
|
|
|
|
result.anvils.push( |
|
|
|
|
await buildAnvilSummary({ anvils, anvilUuid: auuid, hosts }), |
|
|
|
|
); |
|
|
|
|
try { |
|
|
|
|
for (const auuid of Object.keys(alist)) { |
|
|
|
|
result.anvils.push( |
|
|
|
|
await buildAnvilSummary({ anvils, anvilUuid: auuid, hosts }), |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
} catch (error) { |
|
|
|
|
stderr(`Failed to get summary of anvil nodes; CAUSE: ${error}`); |
|
|
|
|
|
|
|
|
|
return response.status(500).send(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
response.json(result); |
|
|
|
|