add userinfo endpoint

merge-requests/4/head
Matthew 2020-12-18 19:49:11 -05:00
parent e3352f89ff
commit 43ac9537c5
No known key found for this signature in database
GPG Key ID: 210AF32ADE3B5C4B
1 changed files with 2 additions and 2 deletions

View File

@ -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));
}
}