aboutsummaryrefslogtreecommitdiffhomepage
path: root/backend/api/handler.go
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2025-03-04 23:39:26 +0900
committernsfisis <nsfisis@gmail.com>2025-03-04 23:39:26 +0900
commitefd34b970d0d1f88fa7d7e9d69e569f039867ca2 (patch)
treeba1e5a51e2fac9ecbe7b9b3e0e197bdb327f2a4e /backend/api/handler.go
parentbd9c2e8b587c733059d44f642c53536eb7fe1ec9 (diff)
downloadphperkaigi-2025-albatross-efd34b970d0d1f88fa7d7e9d69e569f039867ca2.tar.gz
phperkaigi-2025-albatross-efd34b970d0d1f88fa7d7e9d69e569f039867ca2.tar.zst
phperkaigi-2025-albatross-efd34b970d0d1f88fa7d7e9d69e569f039867ca2.zip
rm registration token
Diffstat (limited to 'backend/api/handler.go')
-rw-r--r--backend/api/handler.go9
1 files changed, 2 insertions, 7 deletions
diff --git a/backend/api/handler.go b/backend/api/handler.go
index dafcf84..d16b731 100644
--- a/backend/api/handler.go
+++ b/backend/api/handler.go
@@ -27,16 +27,11 @@ type GameHubsInterface interface {
func (h *Handler) PostLogin(ctx context.Context, request PostLoginRequestObject) (PostLoginResponseObject, error) {
username := request.Body.Username
password := request.Body.Password
- registrationToken := request.Body.RegistrationToken
- userID, err := auth.Login(ctx, h.q, username, password, registrationToken)
+ userID, err := auth.Login(ctx, h.q, username, password)
if err != nil {
log.Printf("login failed: %v", err)
var msg string
- if errors.Is(err, auth.ErrInvalidRegistrationToken) {
- msg = "登録用 URL が無効です。イベントスタッフにお声がけください"
- } else if errors.Is(err, auth.ErrNoRegistrationToken) {
- msg = "登録用 URL からログインしてください。登録用 URL は Connpass のイベントページに記載しています"
- } else if errors.Is(err, auth.ErrForteeLoginTimeout) {
+ if errors.Is(err, auth.ErrForteeLoginTimeout) {
msg = "ログインに失敗しました"
} else {
msg = "ユーザー名またはパスワードが誤っています"