diff --git a/src/cscli/userInfo.ts b/src/cscli/userInfo.ts index 5e9dd36..6d7e6ae 100644 --- a/src/cscli/userInfo.ts +++ b/src/cscli/userInfo.ts @@ -7,7 +7,7 @@ export default class UserInfo extends TCPHandler { } public async handle(ctx: Context) { - const account = await ctx.client.db.Account.findOne({ username: ctx.data.username }); - return ctx.send(account.toJSON()); + const account = await ctx.client.db.Account.findOne({ username: ctx.data.username }).lean().exec(); + return ctx.send(JSON.stringify(account)); } }