diff options
Diffstat (limited to 'src/http')
-rw-r--r-- | src/http/posts.go | 3 | ||||
-rw-r--r-- | src/http/tpl/post.html | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/http/posts.go b/src/http/posts.go index c3f6363..09daac4 100644 --- a/src/http/posts.go +++ b/src/http/posts.go @@ -293,10 +293,9 @@ func postFromPostReq(r *http.Request) (post.Post, error) { if p.ID == "" || p.Title == "" || - p.Description == "" || p.Body == "" || len(p.Tags) == 0 { - return post.Post{}, errors.New("ID, Title, Description, Tags, and Body are all required") + return post.Post{}, errors.New("ID, Title, Tags, and Body are all required") } return p, nil diff --git a/src/http/tpl/post.html b/src/http/tpl/post.html index 23500eb..f10ce94 100644 --- a/src/http/tpl/post.html +++ b/src/http/tpl/post.html @@ -4,9 +4,11 @@ {{ .Payload.Title }} </h1> +{{ if ne .Payload.Description "" }} <p> <em>- {{ .Payload.Description }}</em> </p> +{{ end }} <hr/> |