summaryrefslogtreecommitdiff
path: root/internal/server/custom.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/server/custom.go')
-rw-r--r--internal/server/custom.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/internal/server/custom.go b/internal/server/custom.go
index a9a26b9..0837c86 100644
--- a/internal/server/custom.go
+++ b/internal/server/custom.go
@@ -5,8 +5,8 @@ import (
"log/slog"
"time"
- "codeberg.org/eduVPN/eduvpn-common/internal/api"
"codeberg.org/eduVPN/eduvpn-common/internal/config/v2"
+ "codeberg.org/eduVPN/eduvpn-common/internal/eduvpnapi"
"codeberg.org/eduVPN/eduvpn-common/types/server"
"codeberg.org/jwijenbergh/eduoauth-go/v2"
)
@@ -16,7 +16,7 @@ import (
// `id` is the identifier of the server, the base URL
// `ot` specifies specifies the start time OAuth was already triggered
func (s *Servers) AddCustom(ctx context.Context, id string, ot *int64) error {
- sd := api.ServerData{
+ sd := eduvpnapi.ServerData{
ID: id,
Type: server.TypeCustom,
BaseWK: id,
@@ -40,7 +40,7 @@ func (s *Servers) AddCustom(ctx context.Context, id string, ot *int64) error {
}
// Authorize by creating the API object
- _, err = api.NewAPI(ctx, s.clientID, sd, s.cb, nil)
+ _, err = eduvpnapi.NewAPI(ctx, s.clientID, sd, s.cb, nil)
if err != nil {
// authorization has failed, remove the server again
rerr := s.config.RemoveServer(id, server.TypeCustom)
@@ -58,7 +58,7 @@ func (s *Servers) AddCustom(ctx context.Context, id string, ot *int64) error {
// `tok` are the tokens such that we can initialize the API
// `disableAuth` is set to True when authorization should not be triggered
func (s *Servers) GetCustom(ctx context.Context, id string, tok *eduoauth.Token, disableAuth bool) (*Server, error) {
- sd := api.ServerData{
+ sd := eduvpnapi.ServerData{
ID: id,
Type: server.TypeCustom,
BaseWK: id,
@@ -71,7 +71,7 @@ func (s *Servers) GetCustom(ctx context.Context, id string, tok *eduoauth.Token,
if err != nil {
return nil, err
}
- a, err := api.NewAPI(ctx, s.clientID, sd, s.cb, tok)
+ a, err := eduvpnapi.NewAPI(ctx, s.clientID, sd, s.cb, tok)
if err != nil {
return nil, err
}