func (p *politeiawww) handleLikeComment(w http.ResponseWriter, r *http.Request) {
	log.Tracef("handleLikeComment")

	var lc v1.LikeComment
	decoder := json.NewDecoder(r.Body)
	if err := decoder.Decode(&lc); err != nil {
		RespondWithError(w, r, 0, "handleLikeComment: unmarshal",
			v1.UserError{
				ErrorCode: v1.ErrorStatusInvalidInput,
			})
		return
	}

	user, err := p.getSessionUser(r)
	if err != nil {
		RespondWithError(w, r, 0,
			"handleLikeComment: getSessionUser %v", err)
		return
	}

	cr, err := p.backend.ProcessLikeComment(lc, user)
	if err != nil {
		RespondWithError(w, r, 0,
			"handleLikeComment: ProcessLikeComment %v", err)
		return
	}

	util.RespondWithJSON(w, http.StatusOK, cr)
}
// handleLikeComment handles up or down voting of commentd.
handleLikeComment handles up or down voting of commentd.
// handleLikeComment handles up or down voting of commentd .
func (p *politeiawww) handleLikeComment(w http.ResponseWriter, r *http.Request) {
	log.Tracef("handleLikeComment")
	var lc v1.LikeComment
	decoder := json.NewDecoder(r.Body)
	if err := decoder.Decode(&lc); err != nil {
		RespondWithError(w, r, 0, "handleLikeComment: unmarshal",
			v1.UserError{
				ErrorCode: v1.ErrorStatusInvalidInput,
			})
		return
	}
	user, err := p.getSessionUser(r)
	if err != nil {
		RespondWithError(w, r, 0,
			"handleLikeComment: getSessionUser %v", err)
		return
	}
	cr, err := p.backend.ProcessLikeComment(lc, user)
	if err != nil {
		RespondWithError(w, r, 0,
			"handleLikeComment: ProcessLikeComment %v", err)
		return
	}
	util.RespondWithJSON(w, http.StatusOK, cr)
}
func ( p * politeiawww ) handleLikeComment ( w http . ResponseWriter , r * http . Request ) { log . Tracef ( " " ) var lc v1 . LikeComment decoder := json . NewDecoder ( r . Body ) if err := decoder . Decode ( & lc ) ; err != nil { RespondWithError ( w , r , 0 , " " , v1 . UserError { ErrorCode : v1 . ErrorStatusInvalidInput , } ) return } user , err := p . getSessionUser ( r ) if err != nil { RespondWithError ( w , r , 0 , " " , err ) return } cr , err := p . backend . ProcessLikeComment ( lc , user ) if err != nil { RespondWithError ( w , r , 0 , " " , err ) return } util . RespondWithJSON ( w , http . StatusOK , cr ) }
handleLikeComment handles up or down voting of commentd.
handleLikeComment handles up or down voting of commentd .