Checkpoint: Correction du bouton œil dans la page apprenants pour les formateurs - changement de adminProcedure à protectedProcedure pour apprenants.getInscriptions
This commit is contained in:
@@ -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";
|
||||
|
||||
|
||||
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user