1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 18:28:37 +00:00

Add system setting table with cache and also add cache supports for user setting (#18058)

This commit is contained in:
Lunny Xiao
2022-10-17 07:29:26 +08:00
committed by GitHub
parent 5d3dbffa15
commit f860a6d2e4
59 changed files with 1117 additions and 436 deletions

View File

@@ -8,7 +8,7 @@ import (
"fmt"
"strings"
admin_model "code.gitea.io/gitea/models/admin"
system_model "code.gitea.io/gitea/models/system"
"code.gitea.io/gitea/modules/git"
"code.gitea.io/gitea/modules/log"
base "code.gitea.io/gitea/modules/migration"
@@ -17,7 +17,7 @@ import (
// WarnAndNotice will log the provided message and send a repository notice
func WarnAndNotice(fmtStr string, args ...interface{}) {
log.Warn(fmtStr, args...)
if err := admin_model.CreateRepositoryNotice(fmt.Sprintf(fmtStr, args...)); err != nil {
if err := system_model.CreateRepositoryNotice(fmt.Sprintf(fmtStr, args...)); err != nil {
log.Error("create repository notice failed: ", err)
}
}