diff --git a/json_utility.go b/json_utility.go index b95ab72..9e3f0c6 100644 --- a/json_utility.go +++ b/json_utility.go @@ -47,8 +47,9 @@ func NewJSONParams(lang LangMap, return jp } -func NewJSONPayload(r *http.Request, params JSONParams) JSONPayload { +func NewJSONPayload(r *http.Request, table string) JSONPayload { var obj JSONPayload + params := loadTable(table) obj.Method = strings.ToLower(r.Method + " " + r.URL.Path) obj.Params = make(map[string]string, 0) obj.Lang = make(map[string]map[string]string, 0) diff --git a/tables_utility.go b/tables_utility.go index 748b6fb..28bec4e 100644 --- a/tables_utility.go +++ b/tables_utility.go @@ -90,7 +90,7 @@ func InitTables(jsonbuf []byte) error { return nil } -func LoadTable(table string) JSONParams { +func loadTable(table string) JSONParams { return NewJSONParams(_tables.LoadTranslations(table), _tables.LoadFields(table), _tables.LoadIdField(table),