refactor(backend): rename output DTOs to Response naming convention

This commit is contained in:
SaidSoighiri94
2026-06-22 11:01:05 +02:00
parent 101e52236f
commit ab1bf29b7f
7 changed files with 24 additions and 23 deletions
@@ -1,7 +1,7 @@
import { Request, Response } from 'express';
import { AppError } from '../errors/app-error';
import { listerCatalogue } from '../services/materiel.service';
import { toMaterielDto } from '../dtos/materiel.dto';
import { toMaterielResponse } from '../dtos/materiel.dto';
function parseCategorieId(value: unknown): number | undefined {
if (value === undefined) {
@@ -26,5 +26,5 @@ export async function getCatalogue(req: Request, res: Response): Promise<void> {
const categorieId = parseCategorieId(req.query.categorieId);
const materiels = await listerCatalogue(user.campusId, { categorieId, recherche });
res.json({ data: materiels.map(toMaterielDto) });
res.json({ data: materiels.map(toMaterielResponse) });
}