feat: Implement Next.js middleware for authentication and add a new API endpoint to fetch user details.

This commit is contained in:
Timo
2026-01-01 20:43:50 +01:00
parent c2988f1d50
commit a15e3b67c2
2 changed files with 49 additions and 54 deletions

View File

@@ -2,6 +2,9 @@ import { NextRequest, NextResponse } from 'next/server';
import { cookies } from 'next/headers';
import { db } from '@/lib/db';
// Force dynamic rendering (required for cookies)
export const dynamic = 'force-dynamic';
/**
* GET /api/user
* Get current user information