You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
MongooseError: `Model.findOne()` cannot run without a model as `this`. Make sure you are not calling `new Model.findOne()`
at _checkContext (D:\workspace\hubs\user-repo\node_modules\soft-delete-mongoose-plugin\node_modules\mongoose\lib\model.js:1293:11)
at Function.findOne (D:\workspace\hubs\user-repo\node_modules\soft-delete-mongoose-plugin\node_modules\mongoose\lib\model.js:2334:3)
at Function.schema.statics.<computed> [as findOne] (D:\workspace\hubs\user-repo\node_modules\soft-delete-mongoose-plugin\build\index.js:174:63)
at UsersService.getByUsername (D:\workspace\hubs\user-repo\src\app\users\users.service.ts:21:8)
at AuthService.validateUser (D:\workspace\hubs\user-repo\src\app\auth\auth.service.ts:26:42)
at LocalStrategy.validate (D:\workspace\hubs\user-repo\src\app\auth\local.strategy.ts:16:41)
at LocalStrategy.<anonymous> (D:\workspace\hubs\user-repo\node_modules\@nestjs\passport\dist\passport\passport.strategy.js:20:55)
at Generator.next (<anonymous>)
at D:\workspace\hubs\user-repo\node_modules\@nestjs\passport\dist\passport\passport.strategy.js:8:71
at new Promise (<anonymous>)
The text was updated successfully, but these errors were encountered:
user.schema.ts
I got this exeption when fetching users data
The text was updated successfully, but these errors were encountered: