Canlıya alınan hatalar düzeltildi.
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user