Fondation
This commit is contained in:
parent
5744fd9724
commit
0977765a87
8
.eslintrc.json
Normal file
8
.eslintrc.json
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"extends": ["next/core-web-vitals", "next/typescript"],
|
||||||
|
"rules": {
|
||||||
|
"@typescript-eslint/no-unused-vars": ["warn", { "argsIgnorePattern": "^_" }],
|
||||||
|
"@typescript-eslint/no-explicit-any": "warn",
|
||||||
|
"react-hooks/exhaustive-deps": "warn"
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -7,7 +7,7 @@ import { logger } from '@/lib/logger';
|
|||||||
// POST /api/notifications/[id]/read
|
// POST /api/notifications/[id]/read
|
||||||
export async function POST(
|
export async function POST(
|
||||||
request: Request,
|
request: Request,
|
||||||
{ params }: { params: { id: string } }
|
{ params }: { params: Promise<{ id: string }> }
|
||||||
) {
|
) {
|
||||||
try {
|
try {
|
||||||
const session = await getServerSession(authOptions);
|
const session = await getServerSession(authOptions);
|
||||||
@ -15,7 +15,8 @@ export async function POST(
|
|||||||
return NextResponse.json({ error: "Not authenticated" }, { status: 401 });
|
return NextResponse.json({ error: "Not authenticated" }, { status: 401 });
|
||||||
}
|
}
|
||||||
|
|
||||||
const notificationId = params.id;
|
const { id } = await params;
|
||||||
|
const notificationId = id;
|
||||||
if (!notificationId) {
|
if (!notificationId) {
|
||||||
return NextResponse.json(
|
return NextResponse.json(
|
||||||
{ error: "Notification ID is required" },
|
{ error: "Notification ID is required" },
|
||||||
|
|||||||
@ -1,9 +1,7 @@
|
|||||||
/** @type {import('next').NextConfig} */
|
/** @type {import('next').NextConfig} */
|
||||||
const nextConfig = {
|
const nextConfig = {
|
||||||
eslint: {
|
// Note: ESLint configuration is now done via .eslintrc.json or next lint command
|
||||||
ignoreDuringBuilds: false, // ✅ Réactivé - corriger les erreurs avant build
|
// The eslint option in next.config.mjs is deprecated in Next.js 16
|
||||||
dirs: ['app', 'components', 'lib'], // Limiter aux dossiers pertinents
|
|
||||||
},
|
|
||||||
typescript: {
|
typescript: {
|
||||||
ignoreBuildErrors: false, // ✅ Réactivé - corriger les erreurs avant build
|
ignoreBuildErrors: false, // ✅ Réactivé - corriger les erreurs avant build
|
||||||
},
|
},
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user