refactor(backend): rename output DTOs to Response naming convention
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { Request, Response } from 'express';
|
||||
import { AppError } from '../errors/app-error';
|
||||
import { listerMesEmpruntsEnCours } from '../services/emprunt.service';
|
||||
import { toEmpruntDto } from '../dtos/emprunt.dto';
|
||||
import { toEmpruntResponse } from '../dtos/emprunt.dto';
|
||||
|
||||
export async function getMesEmprunts(req: Request, res: Response): Promise<void> {
|
||||
const user = req.user;
|
||||
@@ -10,5 +10,5 @@ export async function getMesEmprunts(req: Request, res: Response): Promise<void>
|
||||
}
|
||||
|
||||
const emprunts = await listerMesEmpruntsEnCours(user.id);
|
||||
res.json({ data: emprunts.map(toEmpruntDto) });
|
||||
res.json({ data: emprunts.map(toEmpruntResponse) });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user