In Meteor how can I publish one server side mongo collection under different names?

后端 未结 3 1739
长发绾君心
长发绾君心 2021-01-03 00:59

I have a server side mongo collection called Profiles.

I need to publish and subscribe to the entire collection of Profiles if user: adminId.

That way the ad

3条回答
  •  佛祖请我去吃肉
    2021-01-03 01:36

    I think the problem here is that you only need the one collection: Profiles.

    So if you just remove the offending line

    MyProfile = new Meteor.Collection("myprofile");
    

    Everything should work fine (you'll have both datasets within the Profiles collection).

提交回复
热议问题