-2
通常の関数、つまり経路に含まれていないエクスポートされた関数にresを入れるにはどうしたらいいですか?Node.js(マングース)にresが定義されていません
function createNewStudent(v,callBackOne){
if (callBackOne) {
studentInfo.callBackOneStudent = callBackOne;
}
// common filter json
var filterjson = common.defaultFilterJson();
filterjson['active'] = true;
filterjson['email'] = v.email;
// student initialization
var student = new Student(v);
async.waterfall([
function (done) {
student.save(function (err) {
if (!err) {
studentInfo.callBackOneStudent();
Employee.update({_id: student.created_by},{"$push": { "students": student._id } }).exec(function (err, employee) { });
done();
}
});
}
}
});
},
function (done) {
var url = config.mailer.studentActivateUrl + student._id;
---error is here-----
res.render('modules/users/server/templates/student-confirmation-email', {
name: student.first_name + ' ' + student.last_name,
appName: 'GAIPP',
url: url
}, function (err, emailHTML) {
done(err, emailHTML, student);
});
}
});
「res」が定義されていません。誰もこのエラーを解決するために私を助けてくれる?
'res'はコードサンプル全体では単純に定義されていません。すべて貼り付けましたか? –
ここにノードコードを貼り付けましたか? –