mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-09 21:10:59 +00:00
chore: temporarily increase insight rate limit to 10/h for testing
This commit is contained in:
1 parent
3bb3837938
commit
c730845775
1 file changed
+1
-1
@@ -14,7 +14,7 @@ export const POST = apiHandler(async (request: NextRequest) => {
|
||||
const { user } = await requireAuth();
|
||||
const userId = user.id;
|
||||
|
||||
const rl = await checkRateLimit(`insights:${userId}`, 2, 60 * 60 * 1000);
|
||||
const rl = await checkRateLimit(`insights:${userId}`, 10, 60 * 60 * 1000);
|
||||
if (!rl.allowed) {
|
||||
return apiError("Maximum 2 insight generations per hour.", 429);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user