map fulfilled promises
This commit is contained in:
parent
a63050e328
commit
ac75d6606d
|
@ -80,7 +80,9 @@ exports.fetch = async function(ctx) {
|
||||||
ctx.body = []
|
ctx.body = []
|
||||||
} else {
|
} else {
|
||||||
const response = await Promise.allSettled(apps)
|
const response = await Promise.allSettled(apps)
|
||||||
ctx.body = response.filter(result => result.status === "fulfilled")
|
ctx.body = response
|
||||||
|
.filter(result => result.status === "fulfilled")
|
||||||
|
.map(({ value }) => value)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -147,7 +147,9 @@
|
||||||
{#if selectedRows.length > 0}
|
{#if selectedRows.length > 0}
|
||||||
<DeleteButton text small on:click={modal.show()}>
|
<DeleteButton text small on:click={modal.show()}>
|
||||||
<Icon name="addrow" />
|
<Icon name="addrow" />
|
||||||
Delete {selectedRows.length} row(s)
|
Delete
|
||||||
|
{selectedRows.length}
|
||||||
|
row(s)
|
||||||
</DeleteButton>
|
</DeleteButton>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue