diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-07-10 19:43:21 +0200 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-07-10 19:43:21 +0200 |
commit | 4771e0008dd26eadbb7eaff64255a6ec914fdadb (patch) | |
tree | 4fd58f8a3f3c2d674b936c99817b4f5fb958c5d8 /client/src/app/signup/signup.component.ts | |
parent | 7a214f746bf420defbf17fa218d90d6233551bf8 (diff) | |
download | PeerTube-4771e0008dd26eadbb7eaff64255a6ec914fdadb.tar.gz PeerTube-4771e0008dd26eadbb7eaff64255a6ec914fdadb.tar.zst PeerTube-4771e0008dd26eadbb7eaff64255a6ec914fdadb.zip |
Better typescript typing for a better world
Diffstat (limited to 'client/src/app/signup/signup.component.ts')
-rw-r--r-- | client/src/app/signup/signup.component.ts | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/client/src/app/signup/signup.component.ts b/client/src/app/signup/signup.component.ts index bcbc8ded3..981fe3c3b 100644 --- a/client/src/app/signup/signup.component.ts +++ b/client/src/app/signup/signup.component.ts | |||
@@ -12,6 +12,7 @@ import { | |||
12 | USER_EMAIL, | 12 | USER_EMAIL, |
13 | USER_PASSWORD | 13 | USER_PASSWORD |
14 | } from '../shared' | 14 | } from '../shared' |
15 | import { UserCreate } from '../../../../shared' | ||
15 | 16 | ||
16 | @Component({ | 17 | @Component({ |
17 | selector: 'my-signup', | 18 | selector: 'my-signup', |
@@ -58,11 +59,11 @@ export class SignupComponent extends FormReactive implements OnInit { | |||
58 | signup () { | 59 | signup () { |
59 | this.error = null | 60 | this.error = null |
60 | 61 | ||
61 | const { username, password, email } = this.form.value | 62 | const userCreate: UserCreate = this.form.value |
62 | 63 | ||
63 | this.userService.signup(username, password, email).subscribe( | 64 | this.userService.signup(userCreate).subscribe( |
64 | () => { | 65 | () => { |
65 | this.notificationsService.success('Success', `Registration for ${username} complete.`) | 66 | this.notificationsService.success('Success', `Registration for ${userCreate.username} complete.`) |
66 | this.router.navigate([ '/videos/list' ]) | 67 | this.router.navigate([ '/videos/list' ]) |
67 | }, | 68 | }, |
68 | 69 | ||