fix controller path + minmod
This commit is contained in:
parent
da38582add
commit
bb8cf07ab6
|
@ -96,7 +96,7 @@ func FetchFormData(req *http.Request) map[string]interface{} {
|
||||||
func (i *Request) LoadController(method string) (func(implement.Arguments, *implement.Response) implement.Response, error) {
|
func (i *Request) LoadController(method string) (func(implement.Arguments, *implement.Response) implement.Response, error) {
|
||||||
|
|
||||||
/* (1) Build controller path */
|
/* (1) Build controller path */
|
||||||
path := fmt.Sprintf("./controllers/%si.so", strings.Join(i.Path, "/"))
|
path := fmt.Sprintf(".build/controller/%si.so", strings.Join(i.Path, "/"))
|
||||||
|
|
||||||
/* (2) Format url */
|
/* (2) Format url */
|
||||||
tmp := []byte(strings.ToLower(method))
|
tmp := []byte(strings.ToLower(method))
|
||||||
|
|
|
@ -73,6 +73,7 @@ func (s *Server) routeRequest(res http.ResponseWriter, httpReq *http.Request) {
|
||||||
|
|
||||||
/* (2) Middleware: authentication */
|
/* (2) Middleware: authentication */
|
||||||
scope := s.Middleware.Run(*httpReq)
|
scope := s.Middleware.Run(*httpReq)
|
||||||
|
fmt.Printf("scope is %v\n", scope)
|
||||||
|
|
||||||
/* (3) Find a matching controller */
|
/* (3) Find a matching controller */
|
||||||
controller := s.findController(req)
|
controller := s.findController(req)
|
||||||
|
|
Loading…
Reference in New Issue