소스 검색

fix: update common.RootUserEmail when root's email changed (#132)

quzard 2 년 전
부모
커밋
07feef5a2e
1개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  1. 3 0
      controller/user.go

+ 3 - 0
controller/user.go

@@ -655,6 +655,9 @@ func EmailBind(c *gin.Context) {
 		})
 		return
 	}
+	if user.Role == common.RoleRootUser {
+		common.RootUserEmail = email
+	}
 	c.JSON(http.StatusOK, gin.H{
 		"success": true,
 		"message": "",