fix(airvpn): remove commas from API locations
This commit is contained in:
@@ -5,6 +5,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"net"
|
"net"
|
||||||
"sort"
|
"sort"
|
||||||
|
"strings"
|
||||||
|
|
||||||
"github.com/qdm12/gluetun/internal/constants/vpn"
|
"github.com/qdm12/gluetun/internal/constants/vpn"
|
||||||
"github.com/qdm12/gluetun/internal/models"
|
"github.com/qdm12/gluetun/internal/models"
|
||||||
@@ -42,10 +43,12 @@ func (u *Updater) FetchServers(ctx context.Context, minServers int) (
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
city := strings.ReplaceAll(apiServer.Location, ", ", "")
|
||||||
|
city = strings.ReplaceAll(city, ",", "")
|
||||||
baseServer := models.Server{
|
baseServer := models.Server{
|
||||||
ServerName: apiServer.PublicName,
|
ServerName: apiServer.PublicName,
|
||||||
Country: apiServer.CountryName,
|
Country: apiServer.CountryName,
|
||||||
City: apiServer.Location,
|
City: city,
|
||||||
Region: apiServer.Continent,
|
Region: apiServer.Continent,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user