return "sleep";
}
@RequestMapping(value = "/deleteSleepLog", method = RequestMethod.POST)
public String deleteSleepLog(HttpServletRequest request, HttpServletResponse response) {
RequestContext context = new RequestContext();
populate(context, request, response);
if (!isAuthorized(context, request)) {
showAuthorize(request, response);
}
String sleepLogId = request.getParameter("sleepLogId");
log.info("Delete sleep log :: sleepLogId = " + sleepLogId);
List<String> messages = new ArrayList<String>();
try {
context.getApiClientService().getClient().deleteSleepLog(context.getOurUser(), Long.valueOf(sleepLogId));
String message = "Sleep log was deleted. sleepLogId = " + sleepLogId;
messages.add(message);
log.info(message);
} catch (FitbitAPIException e) {
populateMessages(messages, e);