Fix Next.js 15 compatibility and TypeScript errors
- Update API route handlers to use async params for Next.js 15 compatibility - Fix MUI DataGrid deprecated props (pageSize -> initialState.pagination) - Replace Material-UI Grid components with Box for better compatibility - Fix admin authentication system with proper request parameters - Update permission constants to match available AdminPermission enum values - Add missing properties to Page interface for type safety - Update .gitignore to exclude venv/, import logs, and large data directories - Optimize Next.js config to reduce memory usage during builds 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -4,7 +4,7 @@ import { getCurrentAdmin } from '@/lib/admin-auth';
|
||||
|
||||
export const runtime = 'nodejs';
|
||||
|
||||
export async function GET() {
|
||||
export async function GET(request: Request) {
|
||||
try {
|
||||
console.log('Admin auth check - starting...');
|
||||
|
||||
@@ -21,7 +21,7 @@ export async function GET() {
|
||||
);
|
||||
}
|
||||
|
||||
const admin = await getCurrentAdmin();
|
||||
const admin = await getCurrentAdmin(request as any);
|
||||
console.log('Admin user found:', !!admin);
|
||||
|
||||
if (!admin) {
|
||||
|
||||
Reference in New Issue
Block a user