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
991c0c74
Commit
991c0c74
authored
Jan 12, 2019
by
Khalid Ali
Browse files
Add API endpoint
parent
5c838a92
Changes
1
Show whitespace changes
Inline
Side-by-side
src/main/java/com/gmu/bookshare/web/BookshareApiController.java
View file @
991c0c74
...
...
@@ -101,6 +101,14 @@ public class BookshareApiController {
return
convertBidToDto
(
bidCreated
);
}
@PostMapping
(
value
=
"/user"
,
consumes
=
MediaType
.
APPLICATION_JSON_VALUE
)
@ResponseStatus
(
HttpStatus
.
CREATED
)
public
ShareUserDto
newListing
(
@RequestBody
ShareUserDto
shareUserDto
)
{
ShareUser
user
=
convertShareUserToEntity
(
shareUserDto
);
ShareUser
userCreated
=
shareUserService
.
addShareUser
(
user
);
return
convertShareUserToDto
(
userCreated
);
}
@GetMapping
(
name
=
"/login"
)
public
String
index
(
ModelMap
modelMap
)
{
Authentication
auth
=
SecurityContextHolder
.
getContext
()
...
...
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