removed unused title in Post
This commit is contained in:
parent
bb5aca2bc1
commit
9209f227c4
3
post.go
3
post.go
|
@ -20,7 +20,6 @@ import (
|
|||
type Post struct {
|
||||
user *User
|
||||
id string
|
||||
title string
|
||||
metaLoaded bool
|
||||
meta PostMeta
|
||||
wmLock sync.Mutex
|
||||
|
@ -155,7 +154,7 @@ func (post *Post) UrlMediaPath(filename string) string {
|
|||
}
|
||||
|
||||
func (post *Post) Title() string {
|
||||
return post.title
|
||||
return post.Meta().Title
|
||||
}
|
||||
|
||||
func (post *Post) ContentFile() string {
|
||||
|
|
7
user.go
7
user.go
|
@ -285,11 +285,6 @@ func (user User) GetPost(id string) (*Post, error) {
|
|||
}
|
||||
|
||||
post := Post{user: &user, id: id}
|
||||
// post.loadMeta()
|
||||
meta := post.Meta()
|
||||
title := meta.Title
|
||||
post.title = fmt.Sprint(title)
|
||||
|
||||
return &post, nil
|
||||
}
|
||||
|
||||
|
@ -312,7 +307,7 @@ func (user User) CreateNewPostFull(meta PostMeta, content string) (*Post, error)
|
|||
break
|
||||
}
|
||||
}
|
||||
post := Post{user: &user, id: folder_name, title: slugHint}
|
||||
post := Post{user: &user, id: folder_name}
|
||||
|
||||
initial_content := ""
|
||||
initial_content += "---\n"
|
||||
|
|
Loading…
Reference in New Issue