Skip to content
This repository was archived by the owner on Sep 8, 2020. It is now read-only.

Commit e614905

Browse files
committed
Update User.js
1 parent 00423df commit e614905

File tree

1 file changed

+0
-27
lines changed

1 file changed

+0
-27
lines changed

modules/User/User.js

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -70,33 +70,6 @@ module.controller( 'UserForm', ($scope, user, wizard) => {
7070
$scope.wizard = wizard;
7171
});
7272

73-
module.factory( 'User', (BaseObject, $http) => {
74-
class User extends BaseObject {
75-
static list() {
76-
return $http.get('/api/users')
77-
.then( (response) => response.data.map(User.new));
78-
}
79-
80-
81-
// checks validity of the property (probably should be in BaseObject)
82-
validate(property) {
83-
if (!User.rules[property])
84-
return true;
85-
86-
var pattern = new RegExp(User.rules[property]);
87-
return pattern.test(this[property]);
88-
}
89-
}
90-
91-
User.rules = {
92-
name: '[a-zA-Z0-1]{4,}', // 4 or more alphanum chars
93-
email: '.+this.gmail.com'
94-
};
95-
96-
return User;
97-
});
98-
99-
10073
module.factory( 'RegistrationWizard', () => {
10174
class RegistrationWizard {
10275
constructor(user) {

0 commit comments

Comments
 (0)