feat: clear rollup
This commit is contained in:
@@ -106,8 +106,21 @@ const command = new Command('me')
|
||||
.action(async (options) => {
|
||||
try {
|
||||
let res = await showMe(false);
|
||||
let isRefresh = false;
|
||||
if (res.code === 200 && res.data?.accessToken) {
|
||||
res = await showMe(false);
|
||||
isRefresh = true;
|
||||
}
|
||||
if (res.code === 200) {
|
||||
if (isRefresh) {
|
||||
console.log(chalk.green('refresh token success'), '\n');
|
||||
}
|
||||
} else {
|
||||
console.log(
|
||||
isRefresh ? chalk.red('refresh token failed, please login again.') : chalk.red('you need login first. \n run `envision login` to login'),
|
||||
'\n',
|
||||
);
|
||||
return;
|
||||
}
|
||||
const baseURL = getConfig().baseURL;
|
||||
const pickData = pick(res?.data, ['username', 'type', 'orgs']);
|
||||
|
||||
Reference in New Issue
Block a user