我有一个作为服务的 cfc。它只有功能。到现在为止还没有任何成员变量。
登录.cfc
function post(required string email, required string password) {
...
variables.password = arguments.password; // wish I didn't have to do this
var User = entityLoad("Users", {email : arguments.email}).filter(
function(item){
return item.validatePassword(variables.password);
});
variables.password = "";
...
我不喜欢我必须设置arguments.password
为variables.password
只是让里面的函数.filter
可以看到它。没有更清洁的方法来做到这一点吗?