func DeleteMessage(w http.ResponseWriter, req *http.Request) {
	haddr, err := hash.NewFromHash(mux.Vars(req)["addr"])
	if err != nil {
		httputils.ErrorOut(w, http.StatusNotFound, accountNotFound)
		return
	}

	messageID := mux.Vars(req)["message"]

	ar := container.Instance.GetAccountRepo()
	err = ar.RemoveMessage(*haddr, messageID)
	if err != nil {
		httputils.ErrorOut(w, http.StatusNotFound, err.Error())
		return
	}

	_ = httputils.JSONOut(w, http.StatusOK, nil)
}
// DeleteMessage will delete a message
DeleteMessage will delete a message
// DeleteMessage will delete a message
func DeleteMessage(w http.ResponseWriter, req *http.Request) {
	haddr, err := hash.NewFromHash(mux.Vars(req)["addr"])
	if err != nil {
		httputils.ErrorOut(w, http.StatusNotFound, accountNotFound)
		return
	}
	messageID := mux.Vars(req)["message"]
	ar := container.Instance.GetAccountRepo()
	err = ar.RemoveMessage(*haddr, messageID)
	if err != nil {
		httputils.ErrorOut(w, http.StatusNotFound, err.Error())
		return
	}
	_ = httputils.JSONOut(w, http.StatusOK, nil)
}
func DeleteMessage ( w http . ResponseWriter , req * http . Request ) { haddr , err := hash . NewFromHash ( mux . Vars ( req ) [ " " ] ) if err != nil { httputils . ErrorOut ( w , http . StatusNotFound , accountNotFound ) return } messageID := mux . Vars ( req ) [ " " ] ar := container . Instance . GetAccountRepo ( ) err = ar . RemoveMessage ( * haddr , messageID ) if err != nil { httputils . ErrorOut ( w , http . StatusNotFound , err . Error ( ) ) return } _ = httputils . JSONOut ( w , http . StatusOK , nil ) }
DeleteMessage will delete a message
DeleteMessage will delete a message