Skip to content

Commit

Permalink
hotfix(oauth): hotfix oauth request
Browse files Browse the repository at this point in the history
Signed-off-by: Mathieu <[email protected]>
  • Loading branch information
mathieu-brl authored and sambrus committed Dec 10, 2024
1 parent b6225da commit 9aed702
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/internal/controllers/oauth/microsoft.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9aed702

Please sign in to comment.