Example #1
0
        public HttpResponseMessage GetSiteEmailNotificationSettings(int siteId)
        {
            try
            {
                var siteEmailSettings = TaskServices.GetSiteEmailNotificationSettings(siteId);

                if (siteEmailSettings != null)
                {
                    return(Request.CreateResponse(HttpStatusCode.OK, siteEmailSettings));
                }

                return(Request.CreateErrorResponse(HttpStatusCode.NotFound, "No data found"));
            }
            catch (Exception ex)
            {
                ex.Data.Add("siteId", siteId);
                ex.Data.Add("HTTPReferrer", "JCRAPI/TaskInfo/GetSiteEmailNotificationSettings");
                WebExceptionHelper.LogException(ex, null);
                return(null);
            }
        }