@RequestMapping(value = ApiRoute.uRegister, method = RequestMethod.POST)
public @ResponseBody ModelAndView register(@RequestBody UserRO userRO,
@RequestHeader("pass") String password) {
Response response = serverResponse();
try {
User user = userRO.user(props);
user.setPassWord(password);
Validity vsUser = userService.validate(user);
if (vsUser.isValid()) {
userService.registerUser(user, request);
response.setResult(user);
} else {
response.setError(key.vdnCode, vsUser.errorMsgs());
}
} catch (Exception e) {
log.error(e.getMessage());
response.setError(key.iseCode, e.getMessage());
}
return mav().addObject(Key.response, response);
}