Lint fixes and testing workflow actions
This commit is contained in:
@@ -66,13 +66,19 @@ func addAccount(client *Client) {
|
||||
var account config.WhatsAppConfig
|
||||
|
||||
fmt.Print("Account ID: ")
|
||||
fmt.Scanln(&account.ID)
|
||||
if _, err := fmt.Scanln(&account.ID); err != nil {
|
||||
checkError(fmt.Errorf("error reading account ID: %v", err))
|
||||
}
|
||||
|
||||
fmt.Print("Phone Number (with country code): ")
|
||||
fmt.Scanln(&account.PhoneNumber)
|
||||
if _, err := fmt.Scanln(&account.PhoneNumber); err != nil {
|
||||
checkError(fmt.Errorf("error reading phone number: %v", err))
|
||||
}
|
||||
|
||||
fmt.Print("Session Path: ")
|
||||
fmt.Scanln(&account.SessionPath)
|
||||
if _, err := fmt.Scanln(&account.SessionPath); err != nil {
|
||||
checkError(fmt.Errorf("error reading session path: %v", err))
|
||||
}
|
||||
|
||||
resp, err := client.Post("/api/accounts/add", account)
|
||||
checkError(err)
|
||||
|
||||
Reference in New Issue
Block a user