Ejemplo n.º 1
0
        public IHttpActionResult SetAsDefault(QuerySiteModel model)
        {
            //Thread.Sleep(2000);

            var userid = User.Identity.GetUserId();

            _siteService.SetDefault(model.SiteId, userid);

            var obj = new
            {
                Success = true,
                Message = "",
            };

            return(Ok(obj));
        }
Ejemplo n.º 2
0
        public IHttpActionResult Get(QuerySiteModel model)
        {
            //Thread.Sleep(2000);
            var userid = User.Identity.GetUserId();

            var switches = _switchService.GetSwitches(userid, model.SiteId).OrderBy(q => q.Order);

            var obj = new
            {
                Success = true,
                Message = "",
                Results = switches
            };

            return(Ok(obj));
        }
Ejemplo n.º 3
0
        public IHttpActionResult GetSite(QuerySiteModel model)
        {
            //Thread.Sleep(2000);

            var userid = User.Identity.GetUserId();

            var result = _siteService.GetSite(model.SiteId, userid);

            var obj = new
            {
                Success = true,
                Message = "",
                Result  = result
            };

            return(Ok(obj));
        }