fixed new user model input and renaming model group
This commit is contained in:
@ -41,7 +41,9 @@ export class UsersComponent implements OnInit {
|
||||
}
|
||||
|
||||
saveUser(user: UserModel) {
|
||||
console.log(user.models);
|
||||
user.models = user.models.filter(e => e !== '');
|
||||
console.log(user.models);
|
||||
this.api.put<UserModel>('/user/' + user.origName, user.sendFormat('admin'), data => {
|
||||
user.deserialize(data);
|
||||
user.edit = false;
|
||||
@ -49,6 +51,7 @@ export class UsersComponent implements OnInit {
|
||||
}
|
||||
|
||||
saveNewUser() {
|
||||
// this.newUser.models = this.newUser.models.filter(e => e !== '' || e !== undefined);
|
||||
this.api.post('/user/new', {...this.newUser.sendFormat('admin'), pass: this.newUserPass}, data => {
|
||||
this.newUser = null;
|
||||
this.users.push(new UserModel().deserialize(data));
|
||||
|
Reference in New Issue
Block a user