Просмотр исходного кода

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

quzard 2 лет назад
Родитель
Сommit
0f6958c57a
1 измененных файлов с 3 добавлено и 0 удалено
  1. 3 0
      controller/user.go

+ 3 - 0
controller/user.go

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