diff options
| author | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2024-03-13 16:22:32 +0100 |
|---|---|---|
| committer | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2024-03-13 16:27:24 +0100 |
| commit | d182c9d52e7e27bb3d5a698d4788a3f0919012bc (patch) | |
| tree | 3e9bd451bb4c6e3b880cc8c18198915a6d3d5d8c /client/client.go | |
| parent | e604b1e1424edff72f4f0e7f447e66ffee850110 (diff) | |
Client + Server: Refactor adding a server by first adding then auth
Otherwise we go to the main state after auth is done and the server is
not yet added
Diffstat (limited to 'client/client.go')
| -rw-r--r-- | client/client.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/client/client.go b/client/client.go index 127c790..7cf1e8b 100644 --- a/client/client.go +++ b/client/client.go @@ -338,17 +338,17 @@ func (c *Client) AddServer(ck *cookie.Cookie, identifier string, _type srvtypes. switch _type { case srvtypes.TypeInstituteAccess: - _, err = c.Servers.AddInstitute(ck.Context(), c.cfg.Discovery(), identifier, ni) + err = c.Servers.AddInstitute(ck.Context(), c.cfg.Discovery(), identifier, ni) if err != nil { return i18nerr.Wrapf(err, "The institute access server with URL: '%s' could not be added", identifier) } case srvtypes.TypeSecureInternet: - _, err = c.Servers.AddSecure(ck.Context(), c.cfg.Discovery(), identifier, ni) + err = c.Servers.AddSecure(ck.Context(), c.cfg.Discovery(), identifier, ni) if err != nil { return i18nerr.Wrapf(err, "The secure internet server with organisation ID: '%s' could not be added", identifier) } case srvtypes.TypeCustom: - _, err = c.Servers.AddCustom(ck.Context(), identifier, ni) + err = c.Servers.AddCustom(ck.Context(), identifier, ni) if err != nil { return i18nerr.Wrapf(err, "The custom server with URL: '%s' could not be added", identifier) } |
