Example #1
0
        public async Task <ApiResponse> SaveEmailSettingsAsync()
        {
            var response = new ApiResponse();

            try
            {
                var model = JsonConvert.DeserializeObject <SiteEmail>(HttpContext.Request.Form["model"][0]);
                model.UserId = CurrentUser.UserId;

                var result = await _service.SaveEmailSettingsAsync(model);

                response.Status  = result.Status;
                response.Message = result.Message;
            }
            catch (Exception ex)
            {
                response.Status  = false;
                response.Message = ex.Message.ToString();
            }

            return(response);
        }