Skip to content

Commit

Permalink
chore: Update request window for submission route to 5 seconds
Browse files Browse the repository at this point in the history
  • Loading branch information
vishalmishraa committed Sep 1, 2024
1 parent 0c56d32 commit 47e14cf
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions apps/problems/Calculate-Fibonacci/tests/inputs/8.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
9
1 change: 1 addition & 0 deletions apps/problems/Calculate-Fibonacci/tests/outputs/8.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
34
2 changes: 1 addition & 1 deletion apps/web/app/api/submission/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export async function POST(req: NextRequest) {
};

//Check if user is allowed to submit
const allowed = await isRequestAllowed(session.user.id, 60);// 1 minute window for 2 requests
const allowed = await isRequestAllowed(session.user.id, 5);// 5 second window for 2 requests
if (!allowed) {
return NextResponse.json(
{
Expand Down

0 comments on commit 47e14cf

Please sign in to comment.