Commit 991c0c74 authored by Khalid Ali's avatar Khalid Ali

Add API endpoint

parent 5c838a92
......@@ -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()
......
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