fix: save no save bug
This commit is contained in:
parent
9f5b3a61c0
commit
af18b39248
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@kevisual/envision-cli",
|
||||
"version": "0.0.28",
|
||||
"version": "0.0.29-alpha.1",
|
||||
"description": "envision command tools",
|
||||
"main": "dist/index.js",
|
||||
"type": "module",
|
||||
|
@ -8,6 +8,8 @@ import { chalk } from '@/module/chalk.ts';
|
||||
import { loginInCommand } from '@/module/login/login-by-web.ts';
|
||||
export const saveToken = async (token: string) => {
|
||||
const baseURL = getBaseURL();
|
||||
const config = getConfig();
|
||||
writeConfig({ ...config, token });
|
||||
const res = await runApp({ path: 'config', key: 'saveToken', payload: { baseURL, token } });
|
||||
if (res.code !== 200) {
|
||||
console.log('Set token failed', res.message || '');
|
||||
|
Loading…
x
Reference in New Issue
Block a user