From bb8cf07ab6959280996c188dd924187f48272426 Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Sat, 7 Jul 2018 23:15:54 +0200 Subject: [PATCH] fix controller path + minmod --- request/request.go | 2 +- server.go | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/request/request.go b/request/request.go index a6056e3..064d0c6 100644 --- a/request/request.go +++ b/request/request.go @@ -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)) diff --git a/server.go b/server.go index 9c0d5cc..a2b57e6 100644 --- a/server.go +++ b/server.go @@ -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)