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