diff options
Diffstat (limited to 'client/src/app/+admin/users/user-add/user-add.component.ts')
-rw-r--r-- | client/src/app/+admin/users/user-add/user-add.component.ts | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/client/src/app/+admin/users/user-add/user-add.component.ts b/client/src/app/+admin/users/user-add/user-add.component.ts index 2d25ab469..0dd99eccd 100644 --- a/client/src/app/+admin/users/user-add/user-add.component.ts +++ b/client/src/app/+admin/users/user-add/user-add.component.ts | |||
@@ -11,6 +11,7 @@ import { | |||
11 | USER_EMAIL, | 11 | USER_EMAIL, |
12 | USER_PASSWORD | 12 | USER_PASSWORD |
13 | } from '../../../shared' | 13 | } from '../../../shared' |
14 | import { UserCreate } from '../../../../../../shared' | ||
14 | 15 | ||
15 | @Component({ | 16 | @Component({ |
16 | selector: 'my-user-add', | 17 | selector: 'my-user-add', |
@@ -57,11 +58,11 @@ export class UserAddComponent extends FormReactive implements OnInit { | |||
57 | addUser () { | 58 | addUser () { |
58 | this.error = null | 59 | this.error = null |
59 | 60 | ||
60 | const { username, password, email } = this.form.value | 61 | const userCreate: UserCreate = this.form.value |
61 | 62 | ||
62 | this.userService.addUser(username, password, email).subscribe( | 63 | this.userService.addUser(userCreate).subscribe( |
63 | () => { | 64 | () => { |
64 | this.notificationsService.success('Success', `User ${username} created.`) | 65 | this.notificationsService.success('Success', `User ${userCreate.username} created.`) |
65 | this.router.navigate([ '/admin/users/list' ]) | 66 | this.router.navigate([ '/admin/users/list' ]) |
66 | }, | 67 | }, |
67 | 68 | ||