Adding comments #4
1 changed files with 1 additions and 1 deletions
|
@ -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"
|
||||
|
|
Reference in a new issue