Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Khalid Ali
bookshare-backend
Commits
6b2f7397
Commit
6b2f7397
authored
Dec 17, 2018
by
Khalid Ali
Browse files
Get Id returns DTO instead of Entity obj
parent
c42d10b3
Changes
1
Show whitespace changes
Inline
Side-by-side
src/main/java/com/gmu/bookshare/web/BookshareApiController.java
View file @
6b2f7397
...
...
@@ -50,8 +50,8 @@ public class BookshareApiController {
}
@GetMapping
(
value
=
"/listing/{id}"
)
Listing
Entity
getOne
(
@PathVariable
Long
id
)
{
return
listingService
.
getById
(
id
);
Listing
Dto
getOne
(
@PathVariable
Long
id
)
{
return
convertToDto
(
listingService
.
getById
(
id
)
)
;
}
private
ListingDto
convertToDto
(
ListingEntity
listingEntity
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment