@@ -42,52 +42,52 @@ func (customRouter *CustomRouter) Application(route string, path string) *bone.R
42
42
43
43
func (customRouter * CustomRouter ) GET (route string , routeFunc CustomHandlerFunc , securityType string ) * bone.Route {
44
44
//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 ))
46
46
}
47
47
48
48
// POST - Post handler
49
49
func (customRouter * CustomRouter ) POST (route string , routeFunc CustomHandlerFunc , securityType string ) * bone.Route {
50
50
//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 ))
52
52
}
53
53
54
54
// PST - Post handler with pst for tidier lines
55
55
func (customRouter * CustomRouter ) PST (route string , routeFunc CustomHandlerFunc , securityType string ) * bone.Route {
56
56
//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 ))
58
58
}
59
59
60
60
// PUT - Put handler
61
61
func (customRouter * CustomRouter ) PUT (route string , routeFunc CustomHandlerFunc , securityType string ) * bone.Route {
62
62
//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 ))
64
64
}
65
65
66
66
// PATCH - Patch handler
67
67
func (customRouter * CustomRouter ) PATCH (route string , routeFunc CustomHandlerFunc , securityType string ) * bone.Route {
68
68
//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 ))
70
70
}
71
71
72
72
// OPTIONS - Options handler
73
73
func (customRouter * CustomRouter ) OPTIONS (route string , routeFunc CustomHandlerFunc , securityType string ) * bone.Route {
74
74
//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 ))
76
76
}
77
77
78
78
// DELETE - Delete handler
79
79
func (customRouter * CustomRouter ) DELETE (route string , routeFunc CustomHandlerFunc , securityType string ) * bone.Route {
80
80
//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 ))
82
82
}
83
83
84
84
// DEL - Delete handler
85
85
func (customRouter * CustomRouter ) DEL (route string , routeFunc CustomHandlerFunc , securityType string ) * bone.Route {
86
86
//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 ))
88
88
}
89
89
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 {
91
91
return authenticate (store , func (w http.ResponseWriter , req * http.Request ) {
92
92
fn (flow .New (w , req , store ))
93
93
}, authMethod )
0 commit comments