add userinfo endpoint
parent
e3352f89ff
commit
43ac9537c5
|
@ -7,7 +7,7 @@ export default class UserInfo extends TCPHandler {
|
||||||
}
|
}
|
||||||
|
|
||||||
public async handle(ctx: Context) {
|
public async handle(ctx: Context) {
|
||||||
const account = await ctx.client.db.Account.findOne({ username: ctx.data.username });
|
const account = await ctx.client.db.Account.findOne({ username: ctx.data.username }).lean().exec();
|
||||||
return ctx.send(account.toJSON());
|
return ctx.send(JSON.stringify(account));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue