chore: cleanup
This commit is contained in:
@@ -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('没有完成初始化!')
|
||||
|
||||
@@ -14,7 +14,6 @@ describe('Test AuthService', () => {
|
||||
id: '1',
|
||||
username: 'test-user',
|
||||
email: 'tukon@gmail.com',
|
||||
authCode: 'authCode',
|
||||
}
|
||||
beforeAll(async () => {
|
||||
const moduleRef = Test.createTestingModule({
|
||||
|
||||
Reference in New Issue
Block a user