How to add fields to the Meteor.users collection

前端 未结 2 448
星月不相逢
星月不相逢 2021-02-10 04:27

I want the Facebook accessToken that is stored in my user\'s document on the client. Following the meteor documentation, I should just add a new publish call.

In

2条回答
  •  一整个雨季
    2021-02-10 04:49

    you should use "fields" keyword

    Meteor.users.find({ _id: this.userId },
        { fields: { the-extra-fields-that-you-want-go-here: 1 } }
    );
    

    http://docs.meteor.com/#fieldspecifiers

提交回复
热议问题