Package com.fitbit.web.context

Examples of com.fitbit.web.context.RequestContext


        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);
View Full Code Here

TOP

Related Classes of com.fitbit.web.context.RequestContext

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.