mirror of
https://github.com/idanoo/GoScrobble
synced 2025-07-01 13:42:20 +00:00
Fix errors
This commit is contained in:
parent
50154a009c
commit
fc1d6fc567
5 changed files with 27 additions and 35 deletions
|
@ -145,7 +145,7 @@ func limitMiddleware(next http.HandlerFunc, limiter *IPRateLimiter) http.Handler
|
|||
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
limiter := limiter.GetLimiter(r.RemoteAddr)
|
||||
if !limiter.Allow() {
|
||||
msg := generateJsonError("Too many requests")
|
||||
msg := generateJsonMessage("Too many requests")
|
||||
w.WriteHeader(http.StatusTooManyRequests)
|
||||
w.Write(msg)
|
||||
return
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue