From 32a45ab4a1fcca8fc618c7fa197ec0bfdd9742b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=80=B2=E6=8D=97=E3=82=BC=E3=83=9F?= <47470998+wolfmagnate@users.noreply.github.com> Date: Sun, 5 Nov 2023 16:59:43 +0900 Subject: [PATCH] =?UTF-8?q?=E5=8B=95=E3=81=8F=E3=82=88=E3=81=86=E3=81=AB?= =?UTF-8?q?=E3=81=97=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- back/handler/handler.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/back/handler/handler.go b/back/handler/handler.go index 28ac0c0..8078e50 100644 --- a/back/handler/handler.go +++ b/back/handler/handler.go @@ -72,6 +72,9 @@ func authMiddleware() gin.HandlerFunc { c.Set("loginUserID", claims.Sub) // ユーザーの存在確認と新規作成のロジックは省略... + if _, err := uc.GetUser(claims.Sub); err != nil { + uc.NewUser(domain.User{ID: claims.Sub}) + } log.Printf("ユーザー認証成功: ユーザーID %s", claims.Sub) } else {