Implemented article preview

This commit is contained in:
2024-07-17 23:25:57 +02:00
parent 4e0bce37a2
commit 46a0cec6df
3 changed files with 75 additions and 39 deletions

View File

@@ -12,7 +12,7 @@ import (
func init() {
gob.Register(b.User{})
gob.Register(f.ArticlePreviewHtmlData{})
gob.Register(f.EditorHTMLData{})
}
func main() {
@@ -68,7 +68,7 @@ func main() {
mux.HandleFunc("GET /show-all-users-delete", f.ShowAllUsers(config, db, store, "delete-user"))
mux.HandleFunc("GET /this-issue", f.ShowCurrentArticles(config, db))
mux.HandleFunc("GET /unpublished-articles", f.ShowUnpublishedArticles(config, db))
mux.HandleFunc("GET /write-article", f.WriteArticle(config, db))
mux.HandleFunc("GET /write-article", f.WriteArticle(config, db, store))
mux.HandleFunc("POST /add-first-user", f.AddFirstUser(config, db, store))
mux.HandleFunc("POST /add-tag", f.AddTag(config, db, store))