gpt4 book ai didi

meteor - 您如何向 Meteor.users 集合添加转换?

转载 作者:行者123 更新时间:2023-12-04 07:40:02 24 4
gpt4 key购买 nike

您如何向 Meteor.users 集合添加转换?

我试过:Users = new Meteor.Collection 'users'但这会破坏 Meteor,因为该集合已经存在。

最佳答案

我至少知道如何破解它。

有一个 _transform 属性附加到 Meteor.users 集合,就像所有其他集合一样。

做就是了:

Meteor.users._transform = function(user) { 
// attach methods, instantiate a user class, etc.
// return the object
}

把它连接起来!凉爽的!

关于meteor - 您如何向 Meteor.users 集合添加转换?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15417365/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com