authorization fix

This commit is contained in:
Aleksandr Zelenin 2018-10-09 16:06:42 +03:00
parent 0dc94fc121
commit d892a9395a

View file

@ -111,26 +111,25 @@ func CliInteractor(clientAuthorizer *clientAuthorizer, registration bool) {
clientAuthorizer.PhoneNumber <- phoneNumber clientAuthorizer.PhoneNumber <- phoneNumber
case TypeAuthorizationStateWaitCode: case TypeAuthorizationStateWaitCode:
fmt.Println("Enter code: ")
var code string var code string
fmt.Scanln(&code) var firstName string
var lastName string
clientAuthorizer.Code <- code fmt.Println("Enter code: ")
fmt.Scanln(&code)
if registration { if registration {
fmt.Println("Enter first name: ") fmt.Println("Enter first name: ")
var firstName string
fmt.Scanln(&firstName) fmt.Scanln(&firstName)
clientAuthorizer.FirstName <- firstName
fmt.Println("Enter last name: ") fmt.Println("Enter last name: ")
var lastName string
fmt.Scanln(&lastName) fmt.Scanln(&lastName)
clientAuthorizer.LastName <- lastName
} }
clientAuthorizer.Code <- code
clientAuthorizer.FirstName <- firstName
clientAuthorizer.LastName <- lastName
case TypeAuthorizationStateReady: case TypeAuthorizationStateReady:
return return
} }