diff options
| author | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2022-11-10 10:00:46 +0100 |
|---|---|---|
| committer | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2022-11-10 10:02:32 +0100 |
| commit | 6df9ea2134103d02ecbe73e945b5df5fb7b131a1 (patch) | |
| tree | dc6fb435d049fa273b344baae4f0394ad95c317e /internal/server/instituteaccess.go | |
| parent | f87b8d988f25c112f457baa24609a44ba85d4f34 (diff) | |
Server: Re-initialize endpoints when getting a config
Diffstat (limited to 'internal/server/instituteaccess.go')
| -rw-r--r-- | internal/server/instituteaccess.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/internal/server/instituteaccess.go b/internal/server/instituteaccess.go index ed0211b..045535a 100644 --- a/internal/server/instituteaccess.go +++ b/internal/server/instituteaccess.go @@ -89,11 +89,11 @@ func (institute *InstituteAccessServer) init( institute.Base.DisplayName = displayName institute.Base.SupportContact = supportContact institute.Base.Type = serverType - endpoints, endpointsErr := APIGetEndpoints(url) + endpointsErr := institute.Base.InitializeEndpoints() if endpointsErr != nil { return types.NewWrappedError(errorMessage, endpointsErr) } - institute.OAuth.Init(url, endpoints.API.V3.Authorization, endpoints.API.V3.Token) - institute.Base.Endpoints = *endpoints + API := institute.Base.Endpoints.API.V3 + institute.OAuth.Init(url, API.Authorization, API.Token) return nil } |
