Canlıya alınan hatalar düzeltildi.

This commit is contained in:
2025-12-30 00:32:26 +03:00
parent b3bceaaff5
commit 922feb8de3
7 changed files with 11 additions and 15 deletions

View File

@@ -7,7 +7,7 @@ export type SecurityEventType = 'login_success' | 'login_failed' | 'otp_sent' |
export async function logActivity(
userId: string | null,
eventType: SecurityEventType,
details: Record<string, any> = {}
details: Record<string, unknown> = {}
) {
try {
// Use Admin Client to bypass RLS for inserting logs
@@ -35,7 +35,6 @@ export async function logActivity(
export async function checkRateLimit(action: string): Promise<{ blocked: boolean, remaining?: number, resetTime?: Date }> {
const MAX_ATTEMPTS = 5
const WINDOW_MINUTES = 10
try {
const supabase = await createAdminClient() || await createClient()