add userinfo endpoint
parent
e3352f89ff
commit
43ac9537c5
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue