\ng-nice\server\api\user.js add方法有问题
wwb568109135 opened this issue · 1 comments
wwb568109135 commented
this.add = function (name, email, password, callback) {
var salt = kits.utils.short_guid();
var db_password = kits.utils.md5(password + salt);
var user = new this.model({
id : kits.utils.short_guid(),
name : name,
email : email,
password: db_password,
salt : salt,
role : constant.user.role.supper_admin
});
user.save(function (err) {
return callback(err);
});
};
这个数据键名 role : constant.user.role.supper_admin
role : kits.constant.user.role.supper_admin
少了个kits对象
why520crazy commented
fixed