fix: 确保数据目录和上传目录存在后再初始化数据库

This commit is contained in:
2026-05-03 13:40:16 +08:00
parent 63b3f9efb3
commit 730ad0d126
2 changed files with 7 additions and 0 deletions
+2
View File
@@ -215,6 +215,8 @@ func startServer() {
logger.Init()
database.Init()
os.MkdirAll("uploads", 0755)
if config.GetString("app.env") == "production" {
gin.SetMode(gin.ReleaseMode)
}