fix: 避免每次都需要switch org的问题
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user