public HttpResponseMessage GetMiscellaneousMessageAsHtml(int id) { return(ErrorFactory.Handle(() => { using (var unitOfWork = new UnitOfWork()) { var response = unitOfWork.Miscellaneous.GetMiscellaneousMessage(id); if (response == null) { return JsonFactory.CreateHTMLResponseMessage(@"<html><head><title>Unable to find page</title></head><body>Unable to find this page.</body></html>", HttpStatusCode.NotFound, this.Request); } return JsonFactory.CreateHTMLResponseMessage(response.PageData, HttpStatusCode.OK, this.Request); } }, this.Request)); }
public HttpResponseMessage GetLatestPrivacyPolicyAsHtml() { return(ErrorFactory.Handle(() => { using (var unitOfWork = new UnitOfWork()) { var response = unitOfWork.Miscellaneous.GetLatestPrivacyPolicy(); if (response == null) { return JsonFactory.CreateHTMLResponseMessage(@"<html><head><title>Privacy Policy</title></head><body>Unable to find the current privacy policy.</body></html>", HttpStatusCode.NotFound, this.Request); } return JsonFactory.CreateHTMLResponseMessage(response.PageData, HttpStatusCode.OK, this.Request); } }, this.Request)); }
public HttpResponseMessage GetLatestTermsAndConditionsAsHtml() { return(ErrorFactory.Handle(() => { using (var unitOfWork = new UnitOfWork()) { var response = unitOfWork.Miscellaneous.GetLatestTermsAndConditions(); if (response == null) { return JsonFactory.CreateHTMLResponseMessage(@"<html><head><title>Terms and Conditions</title></head><body>Unable to find the latest terms and conditions.</body></html>", HttpStatusCode.NotFound, this.Request); } return JsonFactory.CreateHTMLResponseMessage(response.PageData, HttpStatusCode.OK, this.Request); } }, this.Request)); }