Skip to content

Commit 57703d0

Browse files
committed
Exposed Custom
1 parent a58f569 commit 57703d0

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

router.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -42,52 +42,52 @@ func (customRouter *CustomRouter) Application(route string, path string) *bone.R
4242

4343
func (customRouter *CustomRouter) GET(route string, routeFunc CustomHandlerFunc, securityType string) *bone.Route {
4444
//route = strings.ToLower(route)
45-
return customRouter.Mux.GetFunc(route, customHandler("GET", customRouter.Store, routeFunc, securityType))
45+
return customRouter.Mux.GetFunc(route, CustomHandler("GET", customRouter.Store, routeFunc, securityType))
4646
}
4747

4848
// POST - Post handler
4949
func (customRouter *CustomRouter) POST(route string, routeFunc CustomHandlerFunc, securityType string) *bone.Route {
5050
//route = strings.ToLower(route)
51-
return customRouter.Mux.PostFunc(route, customHandler("POST", customRouter.Store, routeFunc, securityType))
51+
return customRouter.Mux.PostFunc(route, CustomHandler("POST", customRouter.Store, routeFunc, securityType))
5252
}
5353

5454
// PST - Post handler with pst for tidier lines
5555
func (customRouter *CustomRouter) PST(route string, routeFunc CustomHandlerFunc, securityType string) *bone.Route {
5656
//route = strings.ToLower(route)
57-
return customRouter.Mux.PostFunc(route, customHandler("POST", customRouter.Store, routeFunc, securityType))
57+
return customRouter.Mux.PostFunc(route, CustomHandler("POST", customRouter.Store, routeFunc, securityType))
5858
}
5959

6060
// PUT - Put handler
6161
func (customRouter *CustomRouter) PUT(route string, routeFunc CustomHandlerFunc, securityType string) *bone.Route {
6262
//route = strings.ToLower(route)
63-
return customRouter.Mux.PutFunc(route, customHandler("PUT", customRouter.Store, routeFunc, securityType))
63+
return customRouter.Mux.PutFunc(route, CustomHandler("PUT", customRouter.Store, routeFunc, securityType))
6464
}
6565

6666
// PATCH - Patch handler
6767
func (customRouter *CustomRouter) PATCH(route string, routeFunc CustomHandlerFunc, securityType string) *bone.Route {
6868
//route = strings.ToLower(route)
69-
return customRouter.Mux.PatchFunc(route, customHandler("PATCH", customRouter.Store, routeFunc, securityType))
69+
return customRouter.Mux.PatchFunc(route, CustomHandler("PATCH", customRouter.Store, routeFunc, securityType))
7070
}
7171

7272
// OPTIONS - Options handler
7373
func (customRouter *CustomRouter) OPTIONS(route string, routeFunc CustomHandlerFunc, securityType string) *bone.Route {
7474
//route = strings.ToLower(route)
75-
return customRouter.Mux.OptionsFunc(route, customHandler("OPTIONS", customRouter.Store, routeFunc, securityType))
75+
return customRouter.Mux.OptionsFunc(route, CustomHandler("OPTIONS", customRouter.Store, routeFunc, securityType))
7676
}
7777

7878
// DELETE - Delete handler
7979
func (customRouter *CustomRouter) DELETE(route string, routeFunc CustomHandlerFunc, securityType string) *bone.Route {
8080
//route = strings.ToLower(route)
81-
return customRouter.Mux.DeleteFunc(route, customHandler("DELETE", customRouter.Store, routeFunc, securityType))
81+
return customRouter.Mux.DeleteFunc(route, CustomHandler("DELETE", customRouter.Store, routeFunc, securityType))
8282
}
8383

8484
// DEL - Delete handler
8585
func (customRouter *CustomRouter) DEL(route string, routeFunc CustomHandlerFunc, securityType string) *bone.Route {
8686
//route = strings.ToLower(route)
87-
return customRouter.Mux.DeleteFunc(route, customHandler("DELETE", customRouter.Store, routeFunc, securityType))
87+
return customRouter.Mux.DeleteFunc(route, CustomHandler("DELETE", customRouter.Store, routeFunc, securityType))
8888
}
8989

90-
func customHandler(reqType string, store *datastore.Datastore, fn CustomHandlerFunc, authMethod string) http.HandlerFunc {
90+
func CustomHandler(reqType string, store *datastore.Datastore, fn CustomHandlerFunc, authMethod string) http.HandlerFunc {
9191
return authenticate(store, func(w http.ResponseWriter, req *http.Request) {
9292
fn(flow.New(w, req, store))
9393
}, authMethod)

0 commit comments

Comments
 (0)