diff --git a/json_utility.go b/json_utility.go index d177a53..184d8a2 100644 --- a/json_utility.go +++ b/json_utility.go @@ -93,22 +93,6 @@ func NewPayload(r *http.Request, table string) Payload { return pload } -// MakePayload returs a payload for provided table with populated Data field. -func MakePayload(r *http.Request, table string, data interface{}) Payload { - var pload Payload - - pload.Method = r.Method + " " + r.RequestURI - if table != "" { - pload.Params = make(map[string]string, 0) - pload.Lang = translations(table) - pload.Fields = fields(table) - pload.IdField = id(table) - pload.Correlations = correlations(table) - } - pload.Data = data - return pload -} - // DeliverPayload encodes payload to w. func DeliverPayload(w http.ResponseWriter, payload Payload) { json.NewEncoder(w).Encode(payload)