Exemplo n.º 1
0
  @RequestMapping(value = "security/community/registration", method = RequestMethod.POST)
  public @ResponseBody Map<String, ? extends Object> communityRegistration(
      @RequestBody CommunityInfoModel communityInfoModel) {
    try {
      Community community = profileModelService.registration(communityInfoModel);
      if (community == null)
        throw scopeService
            .getErrorServise()
            .createException(AccountException.class, ErrorEnum.REGISTRATION_FAILURE);
    } catch (Throwable e) {
      throw new RestException(e);
    }

    return Ajax.emptyResponse();
  }
Exemplo n.º 2
0
  @RequestMapping(value = "user/registration", method = RequestMethod.POST)
  public @ResponseBody Map<String, ? extends Object> userRegistration(
      @RequestBody RegistrationInfoModel registrationInfo) {
    try {
      User user = profileModelService.registration(registrationInfo);
      if (user == null)
        throw scopeService
            .getErrorServise()
            .createException(AccountException.class, ErrorEnum.REGISTRATION_FAILURE);
    } catch (Throwable e) {
      throw new RestException(e);
    }

    return Ajax.emptyResponse();
  }