From 8f7ded18facaba172f62fd21e8114f2141d1a5ff Mon Sep 17 00:00:00 2001 From: Mathieu Date: Tue, 10 Dec 2024 12:04:28 +0100 Subject: [PATCH] hotfix(oauth): hotfix oauth request Signed-off-by: Mathieu --- server/internal/controllers/oauth/microsoft.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/internal/controllers/oauth/microsoft.go b/server/internal/controllers/oauth/microsoft.go index 00384f1..3eaba49 100644 --- a/server/internal/controllers/oauth/microsoft.go +++ b/server/internal/controllers/oauth/microsoft.go @@ -34,7 +34,7 @@ func createAccount(c *gin.Context, response MicrosoftResponse, token *models.Tok func getBindedAccount(c *gin.Context, response MicrosoftResponse, token *models.Token) (*models.User, error) { serviceId, _ := pkg.GetServiceFromName(c.Param("service")) - err := pkg.DB.Where("email = ? AND service_id = 3", token.Email, serviceId).First(token).Error + err := pkg.DB.Where("email = ? AND service_id = ?", token.Email, serviceId).First(token).Error if errors.Is(err, gorm.ErrRecordNotFound) { return createAccount(c, response, token), nil