Skip to content

Commit 29aeb27

Browse files
committed
fix: runWizard token argument
#267 (comment)
1 parent 42a69d2 commit 29aeb27

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/devtools/src/server-rpc/wizard.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@ import type { NuxtDevtoolsServerContext, ServerFunctions, WizardActions } from '
44
import { wizard } from '../wizard'
55
import { LOG_PREFIX } from '../logger'
66

7-
export function setupWizardRPC({ nuxt }: NuxtDevtoolsServerContext) {
7+
export function setupWizardRPC({ nuxt, ensureDevAuthToken }: NuxtDevtoolsServerContext) {
88
return {
9-
runWizard(name: WizardActions, ...args: any[]) {
9+
async runWizard(token, name: WizardActions, ...args: any[]) {
10+
await ensureDevAuthToken(token)
1011
logger.info(LOG_PREFIX, `Running wizard ${c.green(name)}...`)
1112
return (wizard[name] as any)(nuxt, ...args as [])
1213
},

0 commit comments

Comments
 (0)