0
我一直在使用流星兩個星期,我想添加功能發送用戶帳戶一旦創建電子郵件。我看了幾個關於Accounts.onCreateUser()函數的教程。這是下面的代碼。Meteor Accounts.createUser引發內部服務器錯誤?
if(Meteor.isClient{
....some code here.....
Accounts.createUser({
..... Insert some options ......
}, function(error){
..... some More code here ......
});
}
if(Meteor.isServer){
Accounts.onCreate(function(options, user){
...... Do the required .......
});
}
它似乎是根據我一直在使用的幾個教程。
我測試了代碼,但該帳戶的onCreate總是返回'內部服務器錯誤',我無法找到它的原因。這是我認爲該窗體的Accounts.onCreate()回調的方式嗎?
還有一個調試功能,如果是的話,我可以進一步跟蹤代碼?
感謝