refactor: SSR on skills management

This commit is contained in:
Julien Froidefond
2025-08-25 09:04:33 +02:00
parent e02af4f992
commit 0c7903bcb2
6 changed files with 51 additions and 52 deletions

View File

@@ -4,20 +4,6 @@ import { SkillsService } from "@/services/skills-service";
// Configuration pour éviter la génération statique
export const dynamic = "force-dynamic";
// GET - Récupérer toutes les skills
export async function GET() {
try {
const skills = await SkillsService.getAllSkillsWithUsage();
return NextResponse.json(skills);
} catch (error) {
console.error("Error fetching skills:", error);
return NextResponse.json(
{ error: "Erreur lors de la récupération des skills" },
{ status: 500 }
);
}
}
// POST - Créer une nouvelle skill
export async function POST(request: NextRequest) {
try {