refactor codes and applied comments

This commit is contained in:
Alexandre Cloutier
2014-10-21 14:44:48 -04:00
committed by Francis Lachapelle
parent c82143fd2e
commit 22faf5c285
9 changed files with 142 additions and 96 deletions

View File

@@ -13,7 +13,7 @@
}];
/* Factory registration in Angular module */
angular.module('SOGo.Common').factory('sgUser', User.factory);
angular.module('SOGo.Common').factory('User', User.factory);
/* Instance methods
* Public method, assigned to prototype
@@ -21,8 +21,6 @@
User.prototype.$filter = function(search) {
// return a collections of users for a filter
var param = {search: search};
return User.$$resource.fetch(null, "usersSearch", param).then(function(results) {
return results;
})
return User.$$resource.fetch(null, "usersSearch", param);
};
})();