Skip to content

Commit

Permalink
You can now only create 3 posts in 3 minutes
Browse files Browse the repository at this point in the history
  • Loading branch information
SupertigerDev committed Dec 23, 2024
1 parent 617e915 commit 05d255e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/routes/posts/postCreate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ export function postCreate(Router: Router) {
authenticate(),
rateLimit({
name: 'create_post',
restrictMS: 20000,
requests: 5,
restrictMS: 180000,
requests: 3,
}),
body('content').isString().withMessage('Content must be a string!').optional(true),
body('postId').isString().withMessage('postId must be a string!').isLength({ min: 1, max: 500 }).withMessage('Content length must be between 1 and 500 characters.').optional(true),
Expand Down

0 comments on commit 05d255e

Please sign in to comment.