chore: remove next-auth, use simple auth

This commit is contained in:
2026-07-30 12:36:37 +03:00
parent 53e423100f
commit 5045e07970
6 changed files with 21 additions and 105 deletions
+2 -6
View File
@@ -1,12 +1,8 @@
import { auth } from '@/lib/auth'
import { NextResponse } from 'next/server'
// NextAuth kaldırıldı — admin koruması şimdilik açık
export async function requireAdmin() {
const session = await auth()
if (!session || (session.user as { role?: string }).role !== 'ADMIN') {
throw new Error('Unauthorized')
}
return session
// İleride env-based token veya başka auth mekanizması eklenebilir
}
export function unauthorized() {