return "profile";
}
@RequestMapping(value = "/profile", method = RequestMethod.POST)
protected String processProfileForm(HttpServletRequest request, HttpServletResponse response) {
RequestContext context = new RequestContext();
populate(context, request, response);
String fullName = request.getParameter("fullName");
String nickname = request.getParameter("nickname");
String gender = request.getParameter("gender");
String dateOfBirth = request.getParameter("dateOfBirth");
String height = request.getParameter("height");
String weight = request.getParameter("weight");
String timezone = request.getParameter("timezone");
List<String> messages = new ArrayList<String>();
try {
List<PostParameter> parameters = new ArrayList<PostParameter>();
parameters.add(new PostParameter("fullname", fullName));
parameters.add(new PostParameter("nickname", nickname));
parameters.add(new PostParameter("gender", gender));
parameters.add(new PostParameter("birthday", dateOfBirth));
parameters.add(new PostParameter("height", height));
parameters.add(new PostParameter("weight", weight));
parameters.add(new PostParameter("timezone", timezone));
UserInfo userInfo = context.getApiClientService().getClient().updateUserInfo(context.getOurUser(), parameters);
String message = "Profile is successfully updated";
messages.add(message);
log.info(message);
} catch (FitbitAPIException e) {
if (e.getApiErrors() != null) {