Adding comments #4

Merged
Asara merged 1 commit from comments into master 2020-02-10 00:37:06 +00:00
Showing only changes of commit d19f8f1581 - Show all commits

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"