From 0f6958c57a08d9676e45186443fe22967373b817 Mon Sep 17 00:00:00 2001 From: quzard <1191890118@qq.com> Date: Wed, 31 May 2023 15:51:31 +0800 Subject: [PATCH] fix: update common.RootUserEmail when root's email changed (#132) --- controller/user.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/controller/user.go b/controller/user.go index b6241d36..46f5d869 100644 --- a/controller/user.go +++ b/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": "",