Add type to item

This commit is contained in:
Peter Stuifzand 2018-07-15 00:21:30 +02:00
parent 3d03a17f42
commit c3d8fb2802

View File

@ -78,6 +78,7 @@ func (h *micropubHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
} else if r.Header.Get("Content-Type") == "application/x-www-form-urlencoded" { } else if r.Header.Get("Content-Type") == "application/x-www-form-urlencoded" {
content := r.FormValue("content") content := r.FormValue("content")
name := r.FormValue("name") name := r.FormValue("name")
item.Type = "entry"
item.Name = name item.Name = name
item.Content = &microsub.Content{Text: content} item.Content = &microsub.Content{Text: content}
item.Published = time.Now().Format(time.RFC3339) item.Published = time.Now().Format(time.RFC3339)