@@ -98,14 +98,14 @@ func newRouter() *mux.Router {
9898 // To maintain compatibility with previous API versions, wrap legacy API
9999 // calls to add the type field and route to the correct handler
100100 r .HandleFunc ("/{value:(?:[0-9]{1,3}\\ .){3}[0-9]{1,3}}" ,
101- auth (wrapLegacyIpRequest (httpGetReputation ))).Methods ("GET" )
101+ auth (wrapLegacyIPRequest (httpGetReputation ))).Methods ("GET" )
102102 r .HandleFunc ("/{value:(?:[0-9]{1,3}\\ .){3}[0-9]{1,3}}" ,
103- auth (wrapLegacyIpRequest (httpPutReputation ))).Methods ("PUT" )
103+ auth (wrapLegacyIPRequest (httpPutReputation ))).Methods ("PUT" )
104104 r .HandleFunc ("/{value:(?:[0-9]{1,3}\\ .){3}[0-9]{1,3}}" ,
105- auth (wrapLegacyIpRequest (httpDeleteReputation ))).Methods ("DELETE" )
105+ auth (wrapLegacyIPRequest (httpDeleteReputation ))).Methods ("DELETE" )
106106 r .HandleFunc ("/violations/{value:(?:[0-9]{1,3}\\ .){3}[0-9]{1,3}}" ,
107- auth (wrapLegacyIpRequest (httpPutViolation ))).Methods ("PUT" )
108- r .HandleFunc ("/violations" , auth (wrapLegacyIpRequest (httpPutViolations ))).Methods ("PUT" )
107+ auth (wrapLegacyIPRequest (httpPutViolation ))).Methods ("PUT" )
108+ r .HandleFunc ("/violations" , auth (wrapLegacyIPRequest (httpPutViolations ))).Methods ("PUT" )
109109
110110 r .HandleFunc ("/violations" , auth (httpGetViolations )).Methods ("GET" )
111111 r .HandleFunc ("/dump" , auth (httpGetAllReputation )).Methods ("GET" )
@@ -122,7 +122,7 @@ func startAPI() error {
122122 return http .ListenAndServe (sruntime .cfg .Listen , mwHandler (newRouter ()))
123123}
124124
125- func wrapLegacyIpRequest (rf func (http.ResponseWriter , * http.Request )) func (http.ResponseWriter , * http.Request ) {
125+ func wrapLegacyIPRequest (rf func (http.ResponseWriter , * http.Request )) func (http.ResponseWriter , * http.Request ) {
126126 return func (w http.ResponseWriter , r * http.Request ) {
127127 m := mux .Vars (r )
128128 m ["type" ] = "ip"
0 commit comments