summaryrefslogtreecommitdiff
path: root/src/http/posts.go
diff options
context:
space:
mode:
authorBrian Picciano <mediocregopher@gmail.com>2022-10-12 23:43:31 +0200
committerBrian Picciano <mediocregopher@gmail.com>2022-10-12 23:43:31 +0200
commitd9570411134273d690e783748dd572696fc14c6f (patch)
treeca9d0780bdc2708e190a2194b751966546935e39 /src/http/posts.go
parentd959985ed0d3509d1369c15bf0c87c35b47eb1db (diff)
Make description an optional field
Diffstat (limited to 'src/http/posts.go')
-rw-r--r--src/http/posts.go3
1 files changed, 1 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