Skip to content

Commit

Permalink
fix: filter out preconstruct, fix async await
Browse files Browse the repository at this point in the history
  • Loading branch information
dalechyn committed Feb 9, 2025
1 parent f364ee4 commit 8e1e895
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/cli/commands/Generate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ export async function generate(options: Generate = {}) {
throw new Error('Unexpected – cant retrieve function name')
return functionName
})
})()
})().filter((name) => name.includes('Preconstruct'))

// Creating sub directories with server actions

Expand Down Expand Up @@ -160,7 +160,7 @@ export async function generate(options: Generate = {}) {
...mutation,
mutationKey: ['${namespaceName}.${functionName}'],
mutationFn: async (args)=> {
const message = Actions.${namespaceName}.${functionName}Preconstruct(args)
const message = await Actions.${namespaceName}.${functionName}Preconstruct(args)
return action({ message })
}
})
Expand Down

0 comments on commit 8e1e895

Please sign in to comment.