Pārlūkot izejas kodu

:art: Show "What's News" after upgrading https://github.com/siyuan-note/siyuan/issues/7902

Liang Ding 2 gadi atpakaļ
vecāks
revīzija
4cc544f7b5
1 mainītis faili ar 7 papildinājumiem un 3 dzēšanām
  1. 7 3
      kernel/api/system.go

+ 7 - 3
kernel/api/system.go

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