chore: cleanup

This commit is contained in:
Innei
2022-06-11 12:44:45 +08:00
parent aaa4daf568
commit 71029fbefe
2 changed files with 1 additions and 2 deletions

View File

@@ -49,7 +49,7 @@ export class UserService {
async getMasterInfo(getLoginIp = false) {
const user = await this.userModel
.findOne()
.select(`-authCode${getLoginIp ? ' +lastLoginIp' : ''}`)
.select(`${getLoginIp ? ' +lastLoginIp' : ''}`)
.lean({ virtuals: true })
if (!user) {
throw new BadRequestException('没有完成初始化!')