From d9570411134273d690e783748dd572696fc14c6f Mon Sep 17 00:00:00 2001 From: Brian Picciano Date: Wed, 12 Oct 2022 23:43:31 +0200 Subject: Make description an optional field --- src/http/posts.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/http/posts.go') 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 -- cgit v1.2.3