}
@RequestMapping(value="/create", produces="application/json", method=RequestMethod.POST)
public String create(UserDto dto) {
if (dto.getId() != null) {
User existingUser = new User(dto.getUsername(),
dto.getFirstName(),
dto.getLastName(),
new Role(dto.getRole()));
service.update(existingUser);
} else {
User newUser = new User(dto.getUsername(),
null,
dto.getFirstName(),
dto.getLastName(),
new Role(dto.getRole()));
service.create(newUser);