Skip to content

Commit 1663442

Browse files
committed
fix: failed to load cert file
1 parent fa3a79a commit 1663442

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

config/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ func Init() {
9999
Cfg.Site.DevMode = Cfg.Server.Devmode
100100

101101
if Cfg.TLS.Enabled {
102-
Cfg.TLS.Cert = path.Join(path.Join(models.Default_Data_Path, Cfg.TLS.Cert))
102+
Cfg.TLS.Cert = path.Join(models.Default_Data_Path, Cfg.TLS.Cert)
103103
Cfg.TLS.Key = path.Join(models.Default_Data_Path, Cfg.TLS.Key)
104104
}
105105

models/article.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ type ArticleSummary struct {
66
Title string `json:"title" gorm:"primaryKey"`
77
UpdateAt *time.Time `json:"updateAt" gorm:"autoUpdateTime;"`
88
Category string `json:"category"`
9-
Summary string `json:"summary"`
9+
Summary string `json:"summary" gorm:"type:TEXT"`
1010
}
1111

1212
type ArticleDetail struct {
1313
Title string `json:"title" gorm:"primaryKey"`
1414
CreateAt *time.Time `json:"createAt" gorm:"autoCreateTime;"`
1515
UpdateAt *time.Time `json:"updateAt" gorm:"autoUpdateTime;"`
16-
Author string `json:"author"`
16+
Author string `json:"author" gorm:"type:VARCHAR(100)"`
1717
Content string `json:"content" gorm:"type:TEXT;index:ft_content,fulltext"`
1818
}

models/comment.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ type Comment struct {
88
CommentUser string `json:"comment_user" gorm:"type:varchar(100)"`
99
CommentTo int `json:"comment_to_order" gorm:"type:int"`
1010
CommentRoot int `json:"comment_root" gorm:"type:int"`
11-
Title string `json:"title" gorm:"index"` // 关联文章标题
11+
Title string `json:"title" gorm:"type:varchar(100);index"` // 关联文章标题
1212
Order int `json:"order" gorm:"default:0"`
1313
CreatedAt *time.Time `json:"created_at" gorm:"autoCreateTime;"`
1414
}

0 commit comments

Comments
 (0)