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
I'm trying to implement mongoose-id-validator in a NestJS project. When I do, the creation of the object gives me a timeout of more than 5 seconds, both when the IDs are valid and when they are not valid.
import * as idValidator from 'mongoose-id-validator';
I ran into this issue but was able to solve it. I was using a non-default mongoose connection, and hadn't passed the connection to mongoose-id-validator. I fixed it by passing the non-default connection into the plugin options:
I'm trying to implement mongoose-id-validator in a NestJS project. When I do, the creation of the object gives me a timeout of more than 5 seconds, both when the IDs are valid and when they are not valid.
import * as idValidator from 'mongoose-id-validator';
EventSchema.plugin(idValidator);
{type: [mongoose.Schema.Types.ObjectId], required: true, ref: 'User'}
The text was updated successfully, but these errors were encountered: