Commit 178074ea authored by Khalid Ali's avatar Khalid Ali
Browse files

Now, DTO to Entity fixed

parent 18967e90
...@@ -13,7 +13,7 @@ import java.util.Date; ...@@ -13,7 +13,7 @@ import java.util.Date;
@Setter @Setter
public class ListingDto { public class ListingDto {
private static final SimpleDateFormat dateFormat private final SimpleDateFormat dateFormat
= new SimpleDateFormat("yyyy-MM-dd HH:mm"); = new SimpleDateFormat("yyyy-MM-dd HH:mm");
private Long id; private Long id;
......
...@@ -69,7 +69,7 @@ public class BookshareApiController { ...@@ -69,7 +69,7 @@ public class BookshareApiController {
private ListingEntity convertToEntity(ListingDto listingDto) throws ParseException { private ListingEntity convertToEntity(ListingDto listingDto) throws ParseException {
ListingEntity post = modelMapper.map(listingDto, ListingEntity.class); ListingEntity post = modelMapper.map(listingDto, ListingEntity.class);
post.setCreateDate(ListingDto.getCreateDateConverted()); post.setCreateDate(listingDto.getCreateDateConverted());
return post; return post;
} }
} }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment