clear code
This commit is contained in:
@@ -13,7 +13,7 @@ const tokenList = new Command('list')
|
||||
// .option('-r --remove <number>', 'remove token by number')
|
||||
.action(async (opts) => {
|
||||
console.log('show token list');
|
||||
queryLogin.cacheStore.init()
|
||||
queryLogin.cacheStore.init();
|
||||
// const res = await queryLogin.cacheStore.cache.get('token');
|
||||
console.log(queryLogin.cacheStore.cacheData);
|
||||
// console.log(util.inspect(res, { colors: true, depth: 4 }));
|
||||
@@ -33,6 +33,11 @@ const baseURL = new Command('baseURL')
|
||||
.action(async (opts) => {
|
||||
let config = getConfig();
|
||||
let list = (config.baseURLList as Array<string>) || [];
|
||||
if (!config.baseURL) {
|
||||
list = ['https://kevisual.cn'];
|
||||
writeConfig({ ...config, baseURL: 'https://kevisual.cn', baseURLList: list });
|
||||
config = getConfig();
|
||||
}
|
||||
const quineList = (list: string[]) => {
|
||||
const newList = new Set(list);
|
||||
return Array.from(newList);
|
||||
|
||||
Reference in New Issue
Block a user