BAREBONE COMMENTS AWOOOOO

This commit is contained in:
Amarpreet Minhas 2020-01-30 00:37:14 -05:00
parent 8cb7407561
commit d19f8f1581

View file

@ -50,7 +50,7 @@ func postComment(w http.ResponseWriter, r *http.Request) {
_, claims, _ := jwtauth.FromContext(r.Context()) _, claims, _ := jwtauth.FromContext(r.Context())
username := claims["username"].(string) username := claims["username"].(string)
post_id := chi.URLParam(r, "id") post_id := chi.URLParam(r, "post_id")
err := json.NewDecoder(r.Body).Decode(newComment) err := json.NewDecoder(r.Body).Decode(newComment)
if err != nil { if err != nil {
returnMessage.Message = "unknown error, try again later" returnMessage.Message = "unknown error, try again later"