feat(pockethost): sequential execution of actions

This commit is contained in:
Ben Allfree 2024-06-29 14:21:21 -07:00
parent c473ed9da4
commit 35edc77a9a
2 changed files with 8 additions and 1 deletions

View File

@ -0,0 +1,5 @@
---
'pockethost': minor
---
Enhancement: actions execute sequentially

View File

@ -66,7 +66,9 @@ async function action(actionName: string, context: any) {
}
const action = actions[actionName]
if (!action) return false
await Promise.all(action.map((handler) => handler(context)))
for (const { handler } of action) {
await handler(context)
}
return true
}