fix controller path + minmod

This commit is contained in:
Adrien Marquès 2018-07-07 23:15:54 +02:00
parent da38582add
commit bb8cf07ab6
2 changed files with 2 additions and 1 deletions

View File

@ -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) {
/* (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 */
tmp := []byte(strings.ToLower(method))

View File

@ -73,6 +73,7 @@ func (s *Server) routeRequest(res http.ResponseWriter, httpReq *http.Request) {
/* (2) Middleware: authentication */
scope := s.Middleware.Run(*httpReq)
fmt.Printf("scope is %v\n", scope)
/* (3) Find a matching controller */
controller := s.findController(req)