diff --git a/server/gestionAttestationsDb.ts b/server/gestionAttestationsDb.ts index 4f4a471..fc1a514 100644 --- a/server/gestionAttestationsDb.ts +++ b/server/gestionAttestationsDb.ts @@ -1,4 +1,4 @@ -import { eq, and, desc, sql } from "drizzle-orm"; +import { eq, desc, and } from "drizzle-orm"; import { getDb } from "./db"; import { formations, attestations, inscriptions, apprenants, sequences, datesFormation } from "../drizzle/schema"; diff --git a/server/routers.ts b/server/routers.ts index 8f8baa4..f488f27 100644 --- a/server/routers.ts +++ b/server/routers.ts @@ -299,7 +299,7 @@ export const appRouter = router({ return { success: true }; }), - getInscriptions: adminProcedure.input(z.object({ id: z.number() })).query(async ({ input }) => { + getInscriptions: protectedProcedure.input(z.object({ id: z.number() })).query(async ({ input }) => { const results = await db.getInscriptionsByApprenant(input.id); // Récupérer les informations de formation et séquence pour chaque inscription const inscriptionsAvecDetails = await Promise.all( diff --git a/todo.md b/todo.md index 5f2803e..d6221f4 100644 --- a/todo.md +++ b/todo.md @@ -1286,3 +1286,4 @@ - [x] Corriger le code backend (aplatir la structure de la requête) - [x] Corriger le code frontend (utiliser l'ID de séquence pour le tri) - [ ] Déployer sur le VPS +- [x] Corriger le bouton "œil" dans la page apprenants (formateur) qui n'affiche pas le détail