fix(protonvpn/updater): API authentification fix using email

- `UPDATER_PROTONVPN_USERNAME` ->  `UPDATER_PROTONVPN_EMAIL`
- `-proton-username` -> `-proton-email`
- fix authentication flow to use email or username when appropriate
- fix #2985
This commit is contained in:
Quentin McGaw
2025-11-18 13:34:59 +00:00
parent b2859d5a06
commit aa6d26e062
9 changed files with 60 additions and 58 deletions

View File

@@ -8,15 +8,15 @@ import (
type Updater struct {
client *http.Client
username string
email string
password string
warner common.Warner
}
func New(client *http.Client, warner common.Warner, username, password string) *Updater {
func New(client *http.Client, warner common.Warner, email, password string) *Updater {
return &Updater{
client: client,
username: username,
email: email,
password: password,
warner: warner,
}