diff --git a/src/commands/form/create.ts b/src/commands/form/create.ts index 6460ad6..ea92731 100644 --- a/src/commands/form/create.ts +++ b/src/commands/form/create.ts @@ -22,6 +22,7 @@ import { runGuards, handleGuardResult } from '../_blindspot_guards.ts' import { validateFormCreate } from './_validate.ts' import { enhanceFromBackend, formatErrorLine } from '../_error_codes.ts' import { loadAppContext } from '../app/context.ts' +import { loadToken } from '../../core/config.ts' interface CreateOpts { fullName?: string @@ -730,7 +731,7 @@ export function buildFormCreateCommand(): Command { } else { log.error(`发布失败 (code=${rr.code}): ${rr.msg}`) log.error( - `手动发布: curl -X POST "${c.baseUrl || 'http://127.0.0.1:30000'}/api/visualdev/Base/${newId}/Actions/Release" -H "Authorization: ${tokenStore.peek()?.token || 'bearer '}" -H "Content-Type: application/json" -d '{}'`, + `手动发布: curl -X POST "${c.baseUrl}/api/visualdev/Base/${newId}/Actions/Release" -H "Authorization: ${loadToken()?.token ? 'bearer ' + loadToken()!.token : 'bearer '}" -H "Content-Type: application/json" -d '{}'`, ) if (opts.json) printJson({ id: newId, enCode: opts.enCode, type, webType, releaseError: rr.msg }) process.exit(1)