mirror of
https://github.com/wgh136/nysoure.git
synced 2025-12-16 15:51:14 +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