diff --git a/main.go b/main.go index 45ad345..27b84dc 100644 --- a/main.go +++ b/main.go @@ -22,6 +22,7 @@ import ( type Page struct { ID string `json:"id"` Name string `json:"name"` + Description string `json:"description"` Filename string `json:"filename"` HTML string `json:"html"` Tags []string `json:"tags"` @@ -236,6 +237,7 @@ func handleAPIPages(w http.ResponseWriter, r *http.Request) { func createPage(w http.ResponseWriter, r *http.Request) { var req struct { Name string `json:"name"` + Description string `json:"description"` Filename string `json:"filename"` HTML string `json:"html"` Tags []string `json:"tags"` @@ -259,6 +261,7 @@ func createPage(w http.ResponseWriter, r *http.Request) { page := &Page{ ID: generateID(), Name: req.Name, + Description: req.Description, Filename: req.Filename, HTML: req.HTML, Tags: req.Tags, @@ -282,6 +285,7 @@ func updatePage(w http.ResponseWriter, r *http.Request) { var req struct { ID string `json:"id"` Name string `json:"name"` + Description string `json:"description"` Filename string `json:"filename"` HTML string `json:"html"` Tags []string `json:"tags"` @@ -302,6 +306,7 @@ func updatePage(w http.ResponseWriter, r *http.Request) { oldFilename := page.Filename page.Name = req.Name + page.Description = req.Description page.Filename = req.Filename page.HTML = req.HTML page.Tags = req.Tags @@ -429,7 +434,7 @@ body.dark .tag { background: #3a3a3a; }