diff options
| author | Jeroen Wijenbergh <jeroen.wijenbergh@geant.org> | 2025-08-29 14:36:00 +0200 |
|---|---|---|
| committer | Jeroen Wijenbergh <jeroen.wijenbergh@geant.org> | 2025-08-29 14:40:25 +0200 |
| commit | 132782f44603dfdc3b1d875d632f786109ee09a2 (patch) | |
| tree | 71cd1cefee78636167c560c80c8bc79c8982fe26 /internal/server/institute.go | |
| parent | 4a23134e1e5d70a9c8c5857790dbf27585ca3b1f (diff) | |
Discovery: Remove manager and DiscoveryStartup
Diffstat (limited to 'internal/server/institute.go')
| -rw-r--r-- | internal/server/institute.go | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/internal/server/institute.go b/internal/server/institute.go index 348e895..0a7ef3a 100644 --- a/internal/server/institute.go +++ b/internal/server/institute.go @@ -17,15 +17,12 @@ import ( // `disco` are the discovery servers // `id` is the identifier for the server, the base url // `ot` specifies specifies the start time OAuth was already triggered -func (s *Servers) AddInstitute(ctx context.Context, discom *discovery.Manager, id string, ot *int64) error { +func (s *Servers) AddInstitute(ctx context.Context, disco *discovery.Discovery, id string, ot *int64) error { // This is basically done to double check if the server is part of the institute access section of disco - disco, release := discom.Discovery(false) dsrv, err := disco.ServerByURL(id, "institute_access") if err != nil { - release() return err } - release() sd := api.ServerData{ ID: dsrv.BaseURL, @@ -70,15 +67,12 @@ func (s *Servers) AddInstitute(ctx context.Context, discom *discovery.Manager, i // `disco` are the discovery servers // `tok` are the tokens such that we do not have to trigger auth // `disableAuth` is true when auth should never be triggered -func (s *Servers) GetInstitute(ctx context.Context, id string, discom *discovery.Manager, tok *eduoauth.Token, disableAuth bool) (*Server, error) { - disco, release := discom.Discovery(false) +func (s *Servers) GetInstitute(ctx context.Context, id string, disco *discovery.Discovery, tok *eduoauth.Token, disableAuth bool) (*Server, error) { // This is basically done to double check if the server is part of the institute access section of disco dsrv, err := disco.ServerByURL(id, "institute_access") if err != nil { - release() return nil, err } - release() // Get the server from the config _, err = s.config.GetServer(dsrv.BaseURL, server.TypeInstituteAccess) |
