aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--backend/auth/auth.go4
-rw-r--r--backend/fortee/fortee.go (renamed from backend/auth/fortee/fortee.go)2
-rw-r--r--backend/fortee/generated.go (renamed from backend/auth/fortee/generated.go)0
-rw-r--r--backend/gen/oapi-codegen.fortee.yaml2
4 files changed, 4 insertions, 4 deletions
diff --git a/backend/auth/auth.go b/backend/auth/auth.go
index 0e55d8d..10906f5 100644
--- a/backend/auth/auth.go
+++ b/backend/auth/auth.go
@@ -8,8 +8,8 @@ import (
"github.com/jackc/pgx/v5"
"golang.org/x/crypto/bcrypt"
- "github.com/nsfisis/iosdc-japan-2024-albatross/backend/auth/fortee"
"github.com/nsfisis/iosdc-japan-2024-albatross/backend/db"
+ "github.com/nsfisis/iosdc-japan-2024-albatross/backend/fortee"
)
var (
@@ -119,7 +119,7 @@ func verifyForteeAccount(ctx context.Context, username string, password string)
ctx, cancel := context.WithTimeout(ctx, forteeAPITimeout)
defer cancel()
- canonicalizedUsername, err := fortee.LoginFortee(ctx, username, password)
+ canonicalizedUsername, err := fortee.Login(ctx, username, password)
if errors.Is(err, context.DeadlineExceeded) {
return "", ErrForteeLoginTimeout
}
diff --git a/backend/auth/fortee/fortee.go b/backend/fortee/fortee.go
index 25ca9c5..5ec7963 100644
--- a/backend/auth/fortee/fortee.go
+++ b/backend/fortee/fortee.go
@@ -14,7 +14,7 @@ var (
ErrLoginFailed = errors.New("fortee login failed")
)
-func LoginFortee(ctx context.Context, username string, password string) (string, error) {
+func Login(ctx context.Context, username string, password string) (string, error) {
client, err := NewClientWithResponses(apiEndpoint, WithRequestEditorFn(addAcceptHeader))
if err != nil {
return "", err
diff --git a/backend/auth/fortee/generated.go b/backend/fortee/generated.go
index 53529f9..53529f9 100644
--- a/backend/auth/fortee/generated.go
+++ b/backend/fortee/generated.go
diff --git a/backend/gen/oapi-codegen.fortee.yaml b/backend/gen/oapi-codegen.fortee.yaml
index 3bd5819..1799757 100644
--- a/backend/gen/oapi-codegen.fortee.yaml
+++ b/backend/gen/oapi-codegen.fortee.yaml
@@ -2,7 +2,7 @@ package: fortee
generate:
models: true
client: true
-output: ../auth/fortee/generated.go
+output: ../fortee/generated.go
output-options:
skip-prune: true
nullable-type: true