Hello, I’m trying to migrate my app to the new v2.8 with all the changes related to the async calls in order to get rid of the Fibers package.
The problem I’m having is that when I try to run the method findOneAsync from my mongoose schema it’s showing me the error that the findOneAsync is not a function
, I suppose that the problem is coming from the mongoose schema, what am I missing here? Thank you, I add the code of the backend code.
import groupsMongo, { findOneAndRemove, find, findOneAndUpdate, findOneAsync } from ‘…/schemas/groups.js’;
export const getMyGroups = async () => {
if (!Meteor.userId()) {
throw new Meteor.Error(‘not-authorized’);
}let groups = await findOneAsync({ ‘user_id’: Meteor.userId() });
console.log('groups ', groups);
}