This commit is contained in:
Liang Ding 2023-04-06 21:58:46 +08:00
parent 5a7e436ba5
commit 4cc544f7b5
No known key found for this signature in database
GPG key ID: 136F30F901A2231D

View file

@ -50,10 +50,14 @@ func getChangelog(c *gin.Context) {
return return
} }
changelogPath := filepath.Join(changelogsDir, "v"+util.Ver+".md") changelogPath := filepath.Join(changelogsDir, "v"+util.Ver+model.Conf.Lang+".md")
if !gulu.File.IsExist(changelogPath) { if !gulu.File.IsExist(changelogPath) {
logging.LogWarnf("changelog not found: %s", changelogPath) changelogPath = filepath.Join(changelogsDir, "v"+util.Ver+".md")
return if !gulu.File.IsExist(changelogPath) {
logging.LogWarnf("changelog not found: %s", changelogPath)
return
}
} }
contentData, err := os.ReadFile(changelogPath) contentData, err := os.ReadFile(changelogPath)