diff --git a/plugins/counter/api.go b/plugins/counter/api.go index 7be7ee3..35eb4df 100644 --- a/plugins/counter/api.go +++ b/plugins/counter/api.go @@ -45,6 +45,8 @@ func (p *CounterPlugin) mkIncrementByNAPI(direction int) func(w http.ResponseWri delta, err := strconv.Atoi(chi.URLParam(r, "delta")) if err != nil || delta == 0 { delta = direction + } else { + delta = delta * direction } secret, pass, ok := r.BasicAuth()