From d182c9d52e7e27bb3d5a698d4788a3f0919012bc Mon Sep 17 00:00:00 2001 From: jwijenbergh Date: Wed, 13 Mar 2024 16:22:32 +0100 Subject: 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 --- client/client.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'client/client.go') 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) } -- cgit v1.2.3