forked from Yara724/api
read the expert Ids from the db not hardcoded from every flow
This commit is contained in:
@@ -20,6 +20,12 @@ export class ExpertDbService {
|
||||
return await this.expertModel.findOne(user).lean();
|
||||
}
|
||||
|
||||
async findById(userId: string): Promise<ExpertModel | null> {
|
||||
return await this.expertModel
|
||||
.findOne({ _id: new Types.ObjectId(userId) })
|
||||
.lean();
|
||||
}
|
||||
|
||||
async findOneAndUpdate(
|
||||
user: FilterQuery<ExpertModel>,
|
||||
update: FilterQuery<ExpertModel>,
|
||||
|
||||
Reference in New Issue
Block a user