嗨,我試圖與賬戶密碼包的自定義登記表,但我在控制檯得到一個錯誤:Error invoking Method 'insertUser': Internal server error [500]
,並在服務器端:流星創建自定義用戶表單
=> Meteor server restarted
I20170209-20:25:53.029(1)? Exception while invoking method 'insertUser' ReferenceError: password is not defined
這是我的客戶端代碼:
Template.Anmeldung.events({
"submit .add-benutzer": function(event){
var Vorname = event.target.Vorname.value;
var Nachname = event.target.Nachname.value;
var Geburtsdatum = event.target.Geburtsdatum.value;
var Email = event.target.Email.value;
var Passwort = event.target.Passwort.value;
Meteor.call('addBenutzer', Vorname, Nachname, Geburtsdatum, Vorname)
Meteor.call('insertUser', Email, Passwort);
event.target.Vorname.value = "";
event.target.Nachname.value = "";
event.target.Geburtsdatum.value = "";
event.target.Email.value = "";
event.target.Passwort.value = "";
FlowRouter.go('/meineEvents');
return false;
}
});
和我的服務器端代碼:
Meteor.methods({
insertUser(emailVar, paswordVar){
Accounts.createUser(emailVar, passwordVar);
}
});
比k你的每一個幫助;)
謝謝你現在的作品:) – Michael