aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/signup/signup.component.ts
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-07-10 19:43:21 +0200
committerChocobozzz <florian.bigard@gmail.com>2017-07-10 19:43:21 +0200
commit4771e0008dd26eadbb7eaff64255a6ec914fdadb (patch)
tree4fd58f8a3f3c2d674b936c99817b4f5fb958c5d8 /client/src/app/signup/signup.component.ts
parent7a214f746bf420defbf17fa218d90d6233551bf8 (diff)
downloadPeerTube-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.ts7
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'
15import { 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