From 1a3e356097229ddfc07dcd342c6b91b1ac0bf2ad Mon Sep 17 00:00:00 2001 From: marvzhang Date: Tue, 14 Jan 2020 15:42:51 +0800 Subject: [PATCH] =?UTF-8?q?=E9=BB=98=E8=AE=A4=E4=B8=BA=E4=B8=8D=E8=A7=A6?= =?UTF-8?q?=E5=8F=91=E9=80=9A=E7=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/routes/user.go | 3 +++ backend/services/user.go | 3 +++ 2 files changed, 6 insertions(+) diff --git a/backend/routes/user.go b/backend/routes/user.go index 3d636f41..8aae8b24 100644 --- a/backend/routes/user.go +++ b/backend/routes/user.go @@ -101,6 +101,9 @@ func PutUser(c *gin.Context) { Password: utils.EncryptPassword(reqData.Password), Role: reqData.Role, Email: reqData.Email, + Setting: model.UserSetting{ + NotificationTrigger: constants.NotificationTriggerNever, + }, } if err := user.Add(); err != nil { HandleError(http.StatusInternalServerError, c, err) diff --git a/backend/services/user.go b/backend/services/user.go index f20b9e7a..483a7408 100644 --- a/backend/services/user.go +++ b/backend/services/user.go @@ -17,6 +17,9 @@ func InitUserService() error { Username: "admin", Password: utils.EncryptPassword("admin"), Role: constants.RoleAdmin, + Setting: model.UserSetting{ + NotificationTrigger: constants.NotificationTriggerNever, + }, } _ = adminUser.Add() return nil