now request.UrlData is simply an array instead of map[int]
This commit is contained in:
parent
b0002a034d
commit
2afa4759fc
|
@ -19,7 +19,7 @@ func buildRequest(req *http.Request) (*Request, error) {
|
|||
Uri: strings.Split(uri, "/"),
|
||||
GetData: FetchGetData(req),
|
||||
FormData: FetchFormData(req),
|
||||
UrlData: make(map[int]interface{}, 0),
|
||||
UrlData: make([]interface{}, 0),
|
||||
Data: make(map[string]interface{}, 0),
|
||||
}
|
||||
inst.ControllerUri = make([]string, 0, len(inst.Uri))
|
||||
|
|
|
@ -18,10 +18,6 @@ func (s Server) route(res http.ResponseWriter, req *http.Request) {
|
|||
log.Fatal(req)
|
||||
}
|
||||
|
||||
// fmt.Printf("Uri: %v\n", request.Uri)
|
||||
// fmt.Printf("GET: %v\n", request.GetData)
|
||||
// fmt.Printf("POST: %v\n", request.FormData)
|
||||
|
||||
/* (2) Find a controller
|
||||
---------------------------------------------------------*/
|
||||
/* (1) Init browsing cursors */
|
||||
|
@ -50,7 +46,7 @@ func (s Server) route(res http.ResponseWriter, req *http.Request) {
|
|||
|
||||
/* (4) Store them as Data */
|
||||
for i, data := range uriParams {
|
||||
request.UrlData[i] = data
|
||||
request.UrlData = append(request.UrlData, data)
|
||||
request.Data[fmt.Sprintf("URL#%d", i)] = data
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue