返回 AiToEarn
realAuth.service.ts
根目录 / project / aitoearn-electron / server / src / user / realAuth.service.ts
1 /*
2 * @Author: nevin
3 * @Date: 2024-06-17 19:19:15
4 * @LastEditTime: 2025-03-03 14:05:25
5 * @LastEditors: nevin
6 * @Description: realAuth RealAuth
7 */
8 import { Injectable } from '@nestjs/common';
9 import { InjectModel } from '@nestjs/mongoose';
10 import { Model } from 'mongoose';
11 import { RealAuth } from 'src/db/schema/realAuth.schema';
12
13 @Injectable()
14 export class RealAuthService {
15 constructor(
16 @InjectModel(RealAuth.name)
17 private readonly realAuthModel: Model<RealAuth>,
18 ) {}
19
20 async getRealAuthModelByUserId(userId: string) {
21 return await this.realAuthModel.findOne({ userId });
22 }
23 }
24
24 lines TYPESCRIPT