mirror of
https://github.com/pockethost/pockethost.git
synced 2025-09-16 05:30:17 +00:00
feat(pockethost): sequential execution of actions
This commit is contained in:
parent
c473ed9da4
commit
35edc77a9a
5
.changeset/clean-rockets-mate.md
Normal file
5
.changeset/clean-rockets-mate.md
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
'pockethost': minor
|
||||
---
|
||||
|
||||
Enhancement: actions execute sequentially
|
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user