mirror of
https://github.com/wgh136/nysoure.git
synced 2025-09-27 20:27:23 +00:00
Implement comment length and IP rate limiting in comment creation
This commit is contained in:
@@ -38,7 +38,7 @@ func createComment(c fiber.Ctx) error {
|
||||
return model.NewRequestError("Content cannot be empty")
|
||||
}
|
||||
|
||||
comment, err := service.CreateComment(req, userID, uint(resourceID))
|
||||
comment, err := service.CreateComment(req, userID, uint(resourceID), c.IP())
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
Reference in New Issue
Block a user