Example #1
0
        public object Get(TermsAndConditionsRequest request)
        {
            var company = _dao.Get();

            if (company.Version != null &&
                Request.Headers[HttpHeaders.IfNoneMatch] == company.Version)
            {
                return(new HttpResult(HttpStatusCode.NotModified, HttpStatusCode.NotModified.ToString()));
            }

            var shouldForceDisplayOfTermsOnClient = true;

            if (company.Version != null)
            {
                Response.AddHeader(HttpHeaders.ETag, company.Version);
            }
            else
            {
                // version is null, so the terms and conditions have never been triggered
                // don't force them to the user at startup
                shouldForceDisplayOfTermsOnClient = false;
            }

            var result = new TermsAndConditions
            {
                Content = company.TermsAndConditions.ToSafeString(),
                Updated = shouldForceDisplayOfTermsOnClient
            };

            return(result);
        }
 public object Get(PrivacyPolicyRequest request)
 {
     return(new
     {
         Content = _dao.Get().PrivacyPolicy
     });
 }
 public Company Get(Company item)
 {
     return(_companyDao.Get(item));
 }
Example #4
0
 // GET: Company/Privacy
 public ActionResult Index()
 {
     return(View(_companyDao.Get()));
 }