Skip to content
Snippets Groups Projects
Commit 1f91f6f8 authored by Pea Nut's avatar Pea Nut Committed by jkito
Browse files

Update calls to DoGeolocationLookup after API change

We've updated bitmask-core. Before the update, DoGeolocationLookup
returned string and error, now it's just an error.
parent 1f2cd70d
Branches
Tags
1 merge request!265enable setting introducer url using env variable
......@@ -143,12 +143,8 @@ func Init() (*Bitmask, error) {
If the lookup succeeds, we save it in the config file and use it as fallback
the next time.
*/
countryCode, err := b.api.DoGeolocationLookup()
if err == nil {
log.Debug().
Str("countryCode", countryCode).
Msg("Successfully got country code")
} else {
err := b.api.DoGeolocationLookup()
if err != nil {
log.Warn().
Str("err", err.Error()).
Msgf("Could not do geolocation lookup")
......
......@@ -412,6 +412,6 @@ func (b *Bonafide) GetSnowflakeCh() chan *snowflake.StatusEvent {
return b.snowflakeCh
}
func (b *Bonafide) DoGeolocationLookup() (string, error) {
return "", errors.New("DoGeolocationLookup is not supported in v3 (only implemented in bitmask-core)")
func (b *Bonafide) DoGeolocationLookup() error {
return errors.New("DoGeolocationLookup is not supported in v3 (only implemented in bitmask-core)")
}
......@@ -21,5 +21,5 @@ type apiInterface interface {
GetBestGateways(transport string) ([]bonafide.Gateway, error)
FetchAllGateways(transport string) error
GetSnowflakeCh() chan *snowflake.StatusEvent
DoGeolocationLookup() (string, error)
DoGeolocationLookup() error
}
......@@ -146,6 +146,6 @@ func (m *Menshen) GetSnowflakeCh() chan *snowflake.StatusEvent {
return nil
}
func (m *Menshen) DoGeolocationLookup() (string, error) {
func (m *Menshen) DoGeolocationLookup() error {
return m.api.DoGeolocationLookup()
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment