]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/+signup/+register/register-step-channel.component.ts
Split user service
[github/Chocobozzz/PeerTube.git] / client / src / app / +signup / +register / register-step-channel.component.ts
index d965a786550697e5a4bd54f53b2ecda715805fe9..1bc0ccfd3584fefe0b1ab8f2eb16d43b0114f010 100644 (file)
@@ -2,9 +2,9 @@ import { concat, of } from 'rxjs'
 import { pairwise } from 'rxjs/operators'
 import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'
 import { FormGroup } from '@angular/forms'
-import { UserService } from '@app/core'
 import { VIDEO_CHANNEL_DISPLAY_NAME_VALIDATOR, VIDEO_CHANNEL_NAME_VALIDATOR } from '@app/shared/form-validators/video-channel-validators'
 import { FormReactive, FormValidatorService } from '@app/shared/shared-forms'
+import { UserSignupService } from '@app/shared/shared-users'
 
 @Component({
   selector: 'my-register-step-channel',
@@ -17,7 +17,7 @@ export class RegisterStepChannelComponent extends FormReactive implements OnInit
 
   constructor (
     protected formValidatorService: FormValidatorService,
-    private userService: UserService
+    private userSignupService: UserSignupService
   ) {
     super()
   }
@@ -48,7 +48,7 @@ export class RegisterStepChannelComponent extends FormReactive implements OnInit
   private onDisplayNameChange (oldDisplayName: string, newDisplayName: string) {
     const name = this.form.value['name'] || ''
 
-    const newName = this.userService.getNewUsername(oldDisplayName, newDisplayName, name)
+    const newName = this.userSignupService.getNewUsername(oldDisplayName, newDisplayName, name)
     this.form.patchValue({ name: newName })
   }
 }