Adding comments #4

Merged
Asara merged 1 commit from comments into master 2020-02-10 00:37:06 +00:00

View file

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