Skip to content

Commit

Permalink
fix: runWizard token argument
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Jun 15, 2023
1 parent 42a69d2 commit 29aeb27
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/devtools/src/server-rpc/wizard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ import type { NuxtDevtoolsServerContext, ServerFunctions, WizardActions } from '
import { wizard } from '../wizard'
import { LOG_PREFIX } from '../logger'

export function setupWizardRPC({ nuxt }: NuxtDevtoolsServerContext) {
export function setupWizardRPC({ nuxt, ensureDevAuthToken }: NuxtDevtoolsServerContext) {
return {
runWizard(name: WizardActions, ...args: any[]) {
async runWizard(token, name: WizardActions, ...args: any[]) {
await ensureDevAuthToken(token)
logger.info(LOG_PREFIX, `Running wizard ${c.green(name)}...`)
return (wizard[name] as any)(nuxt, ...args as [])
},
Expand Down

0 comments on commit 29aeb27

Please sign in to comment.