Skip to content

Commit d4ae1c2

Browse files
committed
fix: arreglo bug de la ruta para devolver planes en el front
1 parent e14fd11 commit d4ae1c2

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/main/java/com/outfitlab/project/infrastructure/model/UserEntity.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ public UserEntity(String name, String lastName, String email, String satulation,
9797
}
9898

9999
public static UserModel convertEntityToModel(UserEntity entity) {
100-
return new UserModel(
100+
UserModel model = new UserModel(
101101
entity.getName(),
102102
entity.getLastName(),
103103
entity.getEmail(),
@@ -112,6 +112,13 @@ public static UserModel convertEntityToModel(UserEntity entity) {
112112
entity.isStatus(),
113113
entity.getVerificationToken(),
114114
entity.getUserImageUrl());
115+
116+
// Incluir brand si existe
117+
if (entity.getBrand() != null) {
118+
model.setBrand(MarcaEntity.convertToModelWithoutPrendas(entity.getBrand()));
119+
}
120+
121+
return model;
115122
}
116123

117124
public static UserEntity convertModelToEntity(UserModel model) {

0 commit comments

Comments
 (0)