fix moderate docs
This commit is contained in:
@@ -61,5 +61,5 @@ type Locator struct {
|
||||
- `GET /api/v1/id/{id}` - get comment by `id`
|
||||
- `GET /api/v1/count?url=post-url` - get comment's count for `{url}`
|
||||
- `PUT /api/v1/vote/{id}?url=post-url&vote=1` - vote for comment. `vote`=1 will increase score, -1 decreases. _auth required_
|
||||
- `DELETE /api/v1/comment/{id}?url=post-url` - delete comment by `id`. _auth and admin required_
|
||||
- `PUT /user/{userid}?site=side-id&block=1` - block or unblock user. _auth and admin required_
|
||||
- `DELETE /api/v1/moderate/comment/{id}?url=post-url` - delete comment by `id`. _auth and admin required_
|
||||
- `PUT /api/v1/moderate/user/{userid}?site=side-id&block=1` - block or unblock user. _auth and admin required_
|
||||
|
||||
@@ -39,11 +39,11 @@ func Limiter(recSec int, excludeIps ...string) func(http.Handler) http.Handler {
|
||||
}
|
||||
|
||||
keys := []string{
|
||||
r.Header.Get("Authorization"),
|
||||
r.Header.Get("RemoteAddr"),
|
||||
r.Header.Get("X-Forwarded-For"),
|
||||
r.Header.Get("X-Real-IP"),
|
||||
r.Header.Get("RemoteAddr"),
|
||||
r.Header.Get("User-Agent"),
|
||||
r.Header.Get("Authorization"),
|
||||
}
|
||||
|
||||
if httpError := tollbooth.LimitByKeys(l, keys); httpError != nil {
|
||||
|
||||
Reference in New Issue
Block a user