Commit 8202fb0dbc81c60ff3e8f27235b53c8823dbc8e9

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

json payload simplyfied

Showing 2 changed files with 3 additions and 2 deletions   Show diff stats
... ... @@ -47,8 +47,9 @@ func NewJSONParams(lang LangMap,
47 47 return jp
48 48 }
49 49  
50   -func NewJSONPayload(r *http.Request, params JSONParams) JSONPayload {
  50 +func NewJSONPayload(r *http.Request, table string) JSONPayload {
51 51 var obj JSONPayload
  52 + params := loadTable(table)
52 53 obj.Method = strings.ToLower(r.Method + " " + r.URL.Path)
53 54 obj.Params = make(map[string]string, 0)
54 55 obj.Lang = make(map[string]map[string]string, 0)
... ...
tables_utility.go
... ... @@ -90,7 +90,7 @@ func InitTables(jsonbuf []byte) error {
90 90 return nil
91 91 }
92 92  
93   -func LoadTable(table string) JSONParams {
  93 +func loadTable(table string) JSONParams {
94 94 return NewJSONParams(_tables.LoadTranslations(table),
95 95 _tables.LoadFields(table),
96 96 _tables.LoadIdField(table),
... ...