Commit 6b2f7397 authored by Khalid Ali's avatar Khalid Ali
Browse files

Get Id returns DTO instead of Entity obj

parent c42d10b3
......@@ -50,8 +50,8 @@ public class BookshareApiController {
@GetMapping(value = "/listing/{id}")
ListingEntity getOne(@PathVariable Long id) {
return listingService.getById(id);
ListingDto getOne(@PathVariable Long id) {
return convertToDto(listingService.getById(id));
private ListingDto convertToDto(ListingEntity listingEntity) {
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