Editor half way through

This commit is contained in:
Senad Uka
2023-08-28 13:42:58 +02:00
parent 5c229d5e42
commit a3187bdcc1
10 changed files with 1272 additions and 122 deletions

View File

@@ -33,7 +33,7 @@ func (p *Post) HTMLPage() string {
func GetPost(id int) (*Post, error) {
db := GetDB()
post := &Post{}
err := db.Get(post, "SELECT id, post_title, date, markdown_content, gemtext_content, title_slug, year, month, day FROM posts WHERE id = ?", id)
err := db.Get(post, "SELECT id, post_title, date, markdown_content, gemtext_content, title_slug, year, month, day FROM posts WHERE id = ? and gemtext_content is not null", id)
if err != nil {
return nil, err
}