Ejemplo n.º 1
0
        public IHttpActionResult GetWeeklyReview(string id)
        {
            //Determine subplatform
            int suplatformID = -1;

            if (Request.Properties.TryGetValue("SubPlatformID", out object _customObject))
            {
                suplatformID = (int)_customObject;
            }

            widgetManager = new WidgetManager();
            IEnumerable <Widget> widgets;

            if (id.Equals("0"))
            {
                widgets = widgetManager.GetWidgetsForWeeklyReview(suplatformID, null);
            }
            else
            {
                widgets = widgetManager.GetWidgetsForWeeklyReview(suplatformID, id);
            }

            return(Ok(Mapper.Map(widgets, new List <UserWidgetDTO>())));
        }