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
case TypeAuthorizationStateWaitCode:
fmt.Println("Enter code: ")
var code string
fmt.Scanln(&code)
var firstName string
var lastName string
clientAuthorizer.Code <- code
fmt.Println("Enter code: ")
fmt.Scanln(&code)
if registration {
fmt.Println("Enter first name: ")
var firstName string
fmt.Scanln(&firstName)
clientAuthorizer.FirstName <- firstName
fmt.Println("Enter last name: ")
var lastName string
fmt.Scanln(&lastName)
clientAuthorizer.LastName <- lastName
}
clientAuthorizer.Code <- code
clientAuthorizer.FirstName <- firstName
clientAuthorizer.LastName <- lastName
case TypeAuthorizationStateReady:
return
}