Commit 16e304c58a0ce3d7d1ffeb1e1308ae292188e4cd

Authored by Marko Tikvić
1 parent 4cb3081998
Exists in master and in 1 other branch v2

removed MakePayload: not as flexible as anticipated

Showing 1 changed file with 0 additions and 16 deletions   Show diff stats
... ... @@ -93,22 +93,6 @@ func NewPayload(r *http.Request, table string) Payload {
93 93 return pload
94 94 }
95 95  
96   -// MakePayload returs a payload for provided table with populated Data field.
97   -func MakePayload(r *http.Request, table string, data interface{}) Payload {
98   - var pload Payload
99   -
100   - pload.Method = r.Method + " " + r.RequestURI
101   - if table != "" {
102   - pload.Params = make(map[string]string, 0)
103   - pload.Lang = translations(table)
104   - pload.Fields = fields(table)
105   - pload.IdField = id(table)
106   - pload.Correlations = correlations(table)
107   - }
108   - pload.Data = data
109   - return pload
110   -}
111   -
112 96 // DeliverPayload encodes payload to w.
113 97 func DeliverPayload(w http.ResponseWriter, payload Payload) {
114 98 json.NewEncoder(w).Encode(payload)
... ...