fix: update import paths for components and utilities to relative paths

This commit is contained in:
2025-10-17 22:41:52 +02:00
parent 02643e3702
commit 337b07f3c5
33 changed files with 3050 additions and 70 deletions

View File

@@ -1,5 +1,5 @@
import NextAuth from 'next-auth';
import { authOptions } from '@/lib/auth';
import { authOptions } from '../../../../lib/auth'
const handler = NextAuth(authOptions);

View File

@@ -1,7 +1,7 @@
import { NextRequest, NextResponse } from 'next/server';
import { getServerSession } from 'next-auth';
import { authOptions } from '@/lib/auth';
import { prisma } from '@/lib/prisma';
import { authOptions } from '../../../../lib/auth';
import { prisma } from '../../../../lib/prisma';
import bcrypt from 'bcryptjs';
import { v4 as uuidv4 } from 'uuid';

View File

@@ -1,7 +1,7 @@
import { NextRequest, NextResponse } from 'next/server';
import { getServerSession } from 'next-auth';
import { authOptions } from '@/lib/auth';
import { prisma } from '@/lib/prisma';
import { authOptions } from '../../../lib/auth';
import { prisma } from '../../../lib/prisma';
import * as csvWriter from 'csv-writer';
import ExcelJS from 'exceljs';

View File

@@ -1,7 +1,7 @@
import { NextRequest, NextResponse } from 'next/server';
import { getServerSession } from 'next-auth';
import { authOptions } from '@/lib/auth';
import { prisma } from '@/lib/prisma';
import { authOptions } from '../../../../lib/auth';
import { prisma } from '../../../../lib/prisma';
export async function PUT(
request: NextRequest,

View File

@@ -1,7 +1,7 @@
import { NextRequest, NextResponse } from 'next/server';
import { getServerSession } from 'next-auth';
import { authOptions } from '@/lib/auth';
import { prisma } from '@/lib/prisma';
import { authOptions } from '../../../lib/auth';
import { prisma } from '../../../lib/prisma';
import { v4 as uuidv4 } from 'uuid';
export async function GET() {

View File

@@ -1,7 +1,7 @@
import { NextRequest, NextResponse } from 'next/server';
import { getServerSession } from 'next-auth';
import { authOptions } from '@/lib/auth';
import { prisma } from '@/lib/prisma';
import { authOptions } from '../../../lib/auth';
import { prisma } from '../../../lib/prisma';
export async function GET() {
const settings = await prisma.clubSettings.findFirst();

View File

@@ -1,21 +1,21 @@
import { NextRequest, NextResponse } from 'next/server';
import { getServerSession } from 'next-auth';
import { authOptions } from '@/lib/auth';
import { prisma } from '@/lib/prisma';
import { authOptions } from '../../../../lib/auth';
import { prisma } from '../../../../lib/prisma';
export async function DELETE(
request: NextRequest,
{ params }: { params: { id: string } },
{ params }: { params: Promise<{ id: string }> },
) {
const session = await getServerSession(authOptions);
if (!session || session.user.role !== 'SUPER_ADMIN') {
return NextResponse.json({ error: 'Accès refusé' }, { status: 403 });
}
const userId = params.id;
const { id } = await params;
const user = await prisma.user.findUnique({
where: { id: userId },
where: { id },
include: { hours: true },
});
@@ -34,7 +34,7 @@ export async function DELETE(
}
await prisma.user.delete({
where: { id: userId },
where: { id },
});
return NextResponse.json({ message: 'Utilisateur supprimé' });