fix: 避免每次都需要switch org的问题

This commit is contained in:
2024-11-03 03:16:46 +08:00
parent f51a304b81
commit 272845fe87
8 changed files with 166 additions and 25 deletions

View File

@@ -3,17 +3,17 @@ import { getConfig, writeConfig } from '@/module/index.ts';
import {queryMe} from '../query/index.ts';
const command = new Command('me')
.description('')
.action(async () => {
const config = getConfig()
const res = await queryMe();
if(res.code===200) {
console.log('me', res.data)
} else {
console.log('not login')
writeConfig({ ...config, token: '' });
}
});
// const command = new Command('me')
// .description('')
// .action(async () => {
// const config = getConfig()
// const res = await queryMe();
// if(res.code===200) {
// console.log('me', res.data)
// } else {
// console.log('not login')
// writeConfig({ ...config, token: '' });
// }
// });
app.addCommand(command);
// app.addCommand(command);