fix: fix bugs
This commit is contained in:
@@ -34,6 +34,13 @@ export const getTokenList = async () => {
|
||||
}
|
||||
return res;
|
||||
};
|
||||
export const setTokenList = async (data: any[]) => {
|
||||
const res = await runApp({ path: 'config', key: 'setTokenList', payload: { data } });
|
||||
if (res.code !== 200) {
|
||||
console.log('set token list failed', res.message || '');
|
||||
}
|
||||
return res;
|
||||
};
|
||||
// 定义login命令,支持 `-u` 和 `-p` 参数来输入用户名和密码
|
||||
const loginCommand = new Command('login')
|
||||
.description('Login to the application')
|
||||
@@ -45,7 +52,7 @@ const loginCommand = new Command('login')
|
||||
const config = getConfig();
|
||||
let { username, password } = options;
|
||||
if (options.web) {
|
||||
await loginInCommand();
|
||||
await loginInCommand(saveToken);
|
||||
return;
|
||||
}
|
||||
// 如果没有传递参数,则通过交互式输入
|
||||
|
||||
Reference in New Issue
Block a user