fix: threshold typo/missing getter

This commit is contained in:
Gustavo "Guz" L. de Mello
2024-06-12 16:15:37 -03:00
parent 2aa705489b
commit 3edf844494

View File

@@ -54,7 +54,7 @@ func Image(w http.ResponseWriter, r *http.Request) {
error("\"threshold\" parameter missing", errors.New("Missing argument"), http.StatusBadRequest)
return
}
threshold, err := strconv.Atoi("threshold")
threshold, err := strconv.Atoi(params.Get("threshold"))
if error("\"threshold\" parameter is not a valid integer", err, http.StatusBadRequest) {
return
}