public IHttpActionResult GetConfig() { try { var request = new AuthenticatedRequest(); var siteId = request.GetQueryInt("siteId"); var channelId = request.GetQueryInt("channelId"); var channelContentIds = MinContentInfo.ParseMinContentInfoList(request.GetQueryString("channelContentIds")); if (!request.IsAdminLoggin || !request.AdminPermissionsImpl.HasChannelPermissions(siteId, channelId, ConfigManager.ChannelPermissions.ContentDelete)) { return(Unauthorized()); } var siteInfo = SiteManager.GetSiteInfo(siteId); if (siteInfo == null) { return(BadRequest("无法确定内容对应的站点")); } var channelInfo = ChannelManager.GetChannelInfo(siteId, channelId); if (channelInfo == null) { return(BadRequest("无法确定内容对应的栏目")); } var retVal = new List <Dictionary <string, object> >(); foreach (var channelContentId in channelContentIds) { var contentChannelInfo = ChannelManager.GetChannelInfo(siteId, channelContentId.ChannelId); var contentInfo = ContentManager.GetContentInfo(siteInfo, contentChannelInfo, channelContentId.Id); if (contentInfo == null) { continue; } var dict = contentInfo.ToDictionary(); dict["title"] = WebUtils.GetContentTitle(siteInfo, contentInfo, string.Empty); dict["checkState"] = CheckManager.GetCheckState(siteInfo, contentInfo); retVal.Add(dict); } return(Ok(new { Value = retVal })); } catch (Exception ex) { LogUtils.AddErrorLog(ex); return(InternalServerError(ex)); } }
public IHttpActionResult Submit() { try { var request = new AuthenticatedRequest(); var siteId = request.GetPostInt("siteId"); var channelId = request.GetPostInt("channelId"); var channelContentIds = MinContentInfo.ParseMinContentInfoList(request.GetPostString("channelContentIds")); var targetSiteId = request.GetPostInt("targetSiteId"); var targetChannelId = request.GetPostInt("targetChannelId"); var copyType = request.GetPostString("copyType"); if (!request.IsAdminLoggin || !request.AdminPermissionsImpl.HasChannelPermissions(siteId, channelId, ConfigManager.ChannelPermissions.ContentTranslate)) { return(Unauthorized()); } var siteInfo = SiteManager.GetSiteInfo(siteId); if (siteInfo == null) { return(BadRequest("无法确定内容对应的站点")); } var channelInfo = ChannelManager.GetChannelInfo(siteId, channelId); if (channelInfo == null) { return(BadRequest("无法确定内容对应的栏目")); } foreach (var channelContentId in channelContentIds) { ContentUtility.Translate(siteInfo, channelContentId.ChannelId, channelContentId.Id, targetSiteId, targetChannelId, ETranslateContentTypeUtils.GetEnumType(copyType)); } request.AddSiteLog(siteId, channelId, "复制内容", string.Empty); CreateManager.TriggerContentChangedEvent(siteId, channelId); return(Ok(new { Value = true })); } catch (Exception ex) { LogUtils.AddErrorLog(ex); return(InternalServerError(ex)); } }
public IHttpActionResult Submit() { try { var request = new AuthenticatedRequest(); var siteId = request.GetPostInt("siteId"); //var channelId = request.GetPostInt("channelId"); var channelContentIds = MinContentInfo.ParseMinContentInfoList(request.GetPostString("channelContentIds")); var pageType = request.GetPostString("pageType"); var groupNames = TranslateUtils.StringCollectionToStringList(request.GetPostString("groupNames")); var groupName = request.GetPostString("groupName"); var description = request.GetPostString("description"); if (!request.IsAdminLoggin) { return(Unauthorized()); } var siteInfo = SiteManager.GetSiteInfo(siteId); if (siteInfo == null) { return(BadRequest("无法确定内容对应的站点")); } if (pageType == "setGroup") { foreach (var channelContentId in channelContentIds) { var channelInfo = ChannelManager.GetChannelInfo(siteId, channelContentId.ChannelId); var contentInfo = ContentManager.GetContentInfo(siteInfo, channelInfo, channelContentId.Id); if (contentInfo == null) { continue; } var list = TranslateUtils.StringCollectionToStringList(contentInfo.GroupNameCollection); foreach (var name in groupNames) { if (!list.Contains(name)) { list.Add(name); } } contentInfo.GroupNameCollection = TranslateUtils.ObjectCollectionToString(list); DataProvider.ContentDao.Update(siteInfo, channelInfo, contentInfo); } request.AddSiteLog(siteId, "批量设置内容组", $"内容组:{TranslateUtils.ObjectCollectionToString(groupNames)}"); } else if (pageType == "cancelGroup") { foreach (var channelContentId in channelContentIds) { var channelInfo = ChannelManager.GetChannelInfo(siteId, channelContentId.ChannelId); var contentInfo = ContentManager.GetContentInfo(siteInfo, channelInfo, channelContentId.Id); if (contentInfo == null) { continue; } var list = TranslateUtils.StringCollectionToStringList(contentInfo.GroupNameCollection); foreach (var name in groupNames) { if (list.Contains(name)) { list.Remove(name); } } contentInfo.GroupNameCollection = TranslateUtils.ObjectCollectionToString(list); DataProvider.ContentDao.Update(siteInfo, channelInfo, contentInfo); } request.AddSiteLog(siteId, "批量取消内容组", $"内容组:{TranslateUtils.ObjectCollectionToString(groupNames)}"); } else if (pageType == "addGroup") { var groupInfo = new ContentGroupInfo { GroupName = AttackUtils.FilterXss(groupName), SiteId = siteId, Description = AttackUtils.FilterXss(description) }; if (ContentGroupManager.IsExists(siteId, groupInfo.GroupName)) { DataProvider.ContentGroupDao.Update(groupInfo); request.AddSiteLog(siteId, "修改内容组", $"内容组:{groupInfo.GroupName}"); } else { DataProvider.ContentGroupDao.Insert(groupInfo); request.AddSiteLog(siteId, "添加内容组", $"内容组:{groupInfo.GroupName}"); } foreach (var channelContentId in channelContentIds) { var channelInfo = ChannelManager.GetChannelInfo(siteId, channelContentId.ChannelId); var contentInfo = ContentManager.GetContentInfo(siteInfo, channelInfo, channelContentId.Id); if (contentInfo == null) { continue; } var list = TranslateUtils.StringCollectionToStringList(contentInfo.GroupNameCollection); if (!list.Contains(groupInfo.GroupName)) { list.Add(groupInfo.GroupName); } contentInfo.GroupNameCollection = TranslateUtils.ObjectCollectionToString(list); DataProvider.ContentDao.Update(siteInfo, channelInfo, contentInfo); } request.AddSiteLog(siteId, "批量设置内容组", $"内容组:{groupInfo.GroupName}"); } return(Ok(new { Value = true })); } catch (Exception ex) { LogUtils.AddErrorLog(ex); return(InternalServerError(ex)); } }
public IHttpActionResult Submit() { try { var request = new AuthenticatedRequest(); var downloadUrl = string.Empty; var siteId = request.GetPostInt("siteId"); var channelId = request.GetPostInt("channelId"); var channelContentIds = MinContentInfo.ParseMinContentInfoList(request.GetPostString("channelContentIds")); var exportType = request.GetPostString("exportType"); var isAllCheckedLevel = request.GetPostBool("isAllCheckedLevel"); var checkedLevelKeys = request.GetPostObject <List <int> >("checkedLevelKeys"); var isAllDate = request.GetPostBool("isAllDate"); var startDate = request.GetPostDateTime("startDate", DateTime.Now); var endDate = request.GetPostDateTime("endDate", DateTime.Now); var columnNames = request.GetPostObject <List <string> >("columnNames"); if (!request.IsAdminLoggin || !request.AdminPermissions.HasChannelPermissions(siteId, channelId, ConfigManager.ChannelPermissions.ChannelEdit)) { return(Unauthorized()); } var siteInfo = SiteManager.GetSiteInfo(siteId); if (siteInfo == null) { return(BadRequest("无法确定内容对应的站点")); } var channelInfo = ChannelManager.GetChannelInfo(siteId, channelId); if (channelInfo == null) { return(BadRequest("无法确定内容对应的栏目")); } var adminId = channelInfo.Additional.IsSelfOnly ? request.AdminId : request.AdminPermissionsImpl.GetAdminId(siteId, channelId); var isAllContents = channelInfo.Additional.IsAllContents; var columns = ContentManager.GetContentColumns(siteInfo, channelInfo, true); var pluginIds = PluginContentManager.GetContentPluginIds(channelInfo); var pluginColumns = PluginContentManager.GetContentColumns(pluginIds); var contentInfoList = new List <ContentInfo>(); var calculatedContentInfoList = new List <ContentInfo>(); if (channelContentIds.Count == 0) { var ccIds = DataProvider.ContentDao.GetCacheChannelContentIdList(siteInfo, channelInfo, adminId, isAllContents, string.Empty, string.Empty); var count = ccIds.Count; var pages = Convert.ToInt32(Math.Ceiling((double)count / siteInfo.Additional.PageSize)); if (pages == 0) { pages = 1; } if (count > 0) { for (var page = 1; page <= pages; page++) { var offset = siteInfo.Additional.PageSize * (page - 1); var limit = siteInfo.Additional.PageSize; var pageCcIds = ccIds.Skip(offset).Take(limit).ToList(); var sequence = offset + 1; foreach (var channelContentId in pageCcIds) { var contentInfo = ContentManager.GetContentInfo(siteInfo, channelContentId.ChannelId, channelContentId.ContentId); if (contentInfo == null) { continue; } if (!isAllCheckedLevel) { var checkedLevel = contentInfo.CheckedLevel; if (contentInfo.IsChecked) { checkedLevel = siteInfo.Additional.CheckContentLevel; } if (!checkedLevelKeys.Contains(checkedLevel)) { continue; } } if (!isAllDate) { if (contentInfo.AddDate < startDate || contentInfo.AddDate > endDate) { continue; } } contentInfoList.Add(contentInfo); calculatedContentInfoList.Add(ContentManager.Calculate(sequence++, contentInfo, columns, pluginColumns)); } } } } else { var sequence = 1; foreach (var channelContentId in channelContentIds) { var contentInfo = ContentManager.GetContentInfo(siteInfo, channelContentId.ChannelId, channelContentId.Id); if (contentInfo == null) { continue; } if (!isAllCheckedLevel) { var checkedLevel = contentInfo.CheckedLevel; if (contentInfo.IsChecked) { checkedLevel = siteInfo.Additional.CheckContentLevel; } if (!checkedLevelKeys.Contains(checkedLevel)) { continue; } } if (!isAllDate) { if (contentInfo.AddDate < startDate || contentInfo.AddDate > endDate) { continue; } } contentInfoList.Add(contentInfo); calculatedContentInfoList.Add(ContentManager.Calculate(sequence++, contentInfo, columns, pluginColumns)); } } if (contentInfoList.Count > 0) { if (exportType == "zip") { var fileName = $"{channelInfo.ChannelName}.zip"; var filePath = PathUtils.GetTemporaryFilesPath(fileName); var exportObject = new ExportObject(siteId, request.AdminName); contentInfoList.Reverse(); if (exportObject.ExportContents(filePath, contentInfoList)) { downloadUrl = PageUtils.GetTemporaryFilesUrl(fileName); } } else if (exportType == "excel") { var fileName = $"{channelInfo.ChannelName}.csv"; var filePath = PathUtils.GetTemporaryFilesPath(fileName); ExcelObject.CreateExcelFileForContents(filePath, siteInfo, channelInfo, calculatedContentInfoList, columnNames); downloadUrl = PageUtils.GetTemporaryFilesUrl(fileName); } } return(Ok(new { Value = downloadUrl, IsSuccess = !string.IsNullOrEmpty(downloadUrl) })); } catch (Exception ex) { LogUtils.AddErrorLog(ex); return(InternalServerError(ex)); } }
public IHttpActionResult Submit() { try { var request = new AuthenticatedRequest(); var siteId = request.GetPostInt("siteId"); var channelId = request.GetPostInt("channelId"); var channelContentIds = MinContentInfo.ParseMinContentInfoList(request.GetPostString("channelContentIds")); var isRetainFiles = request.GetPostBool("isRetainFiles"); if (!request.IsAdminLoggin || !request.AdminPermissionsImpl.HasChannelPermissions(siteId, channelId, ConfigManager.ChannelPermissions.ContentDelete)) { return(Unauthorized()); } var siteInfo = SiteManager.GetSiteInfo(siteId); if (siteInfo == null) { return(BadRequest("无法确定内容对应的站点")); } var channelInfo = ChannelManager.GetChannelInfo(siteId, channelId); if (channelInfo == null) { return(BadRequest("无法确定内容对应的栏目")); } if (!isRetainFiles) { foreach (var channelContentId in channelContentIds) { DeleteManager.DeleteContent(siteInfo, channelContentId.ChannelId, channelContentId.Id); } } var tableName = ChannelManager.GetTableName(siteInfo, channelInfo); if (channelContentIds.Count == 1) { var channelContentId = channelContentIds[0]; var contentTitle = DataProvider.ContentDao.GetValue(tableName, channelContentId.Id, ContentAttribute.Title); request.AddSiteLog(siteId, channelContentId.ChannelId, channelContentId.Id, "删除内容", $"栏目:{ChannelManager.GetChannelNameNavigation(siteId, channelContentId.ChannelId)},内容标题:{contentTitle}"); } else { request.AddSiteLog(siteId, "批量删除内容", $"栏目:{ChannelManager.GetChannelNameNavigation(siteId, channelId)},内容条数:{channelContentIds.Count}"); } foreach (var distinctChannelId in channelContentIds.Select(x => x.ChannelId).Distinct()) { var contentIdList = channelContentIds.Where(x => x.ChannelId == distinctChannelId) .Select(x => x.Id).ToList(); DataProvider.ContentDao.UpdateTrashContents(siteId, distinctChannelId, tableName, contentIdList); CreateManager.TriggerContentChangedEvent(siteId, distinctChannelId); } return(Ok(new { Value = true })); } catch (Exception ex) { LogUtils.AddErrorLog(ex); return(InternalServerError(ex)); } }
public IHttpActionResult Submit() { try { var request = new AuthenticatedRequest(); var siteId = request.GetPostInt("siteId"); var channelId = request.GetPostInt("channelId"); var channelContentIds = MinContentInfo.ParseMinContentInfoList(request.GetPostString("channelContentIds")); var isUp = request.GetPostBool("isUp"); var taxis = request.GetPostInt("taxis"); if (!request.IsAdminLoggin || !request.AdminPermissionsImpl.HasChannelPermissions(siteId, channelId, ConfigManager.ChannelPermissions.ContentEdit)) { return(Unauthorized()); } var siteInfo = SiteManager.GetSiteInfo(siteId); if (siteInfo == null) { return(BadRequest("无法确定内容对应的站点")); } var channelInfo = ChannelManager.GetChannelInfo(siteId, channelId); if (channelInfo == null) { return(BadRequest("无法确定内容对应的栏目")); } if (ETaxisTypeUtils.Equals(channelInfo.Additional.DefaultTaxisType, ETaxisType.OrderByTaxis)) { isUp = !isUp; } if (isUp == false) { channelContentIds.Reverse(); } foreach (var channelContentId in channelContentIds) { var contentChannelInfo = ChannelManager.GetChannelInfo(siteId, channelContentId.ChannelId); var tableName = ChannelManager.GetTableName(siteInfo, contentChannelInfo); var contentInfo = ContentManager.GetContentInfo(siteInfo, contentChannelInfo, channelContentId.Id); if (contentInfo == null) { continue; } var isTop = contentInfo.IsTop; for (var i = 1; i <= taxis; i++) { if (isUp) { if (DataProvider.ContentDao.SetTaxisToUp(siteId, tableName, channelContentId.ChannelId, channelContentId.Id, isTop) == false) { break; } } else { if (DataProvider.ContentDao.SetTaxisToDown(siteId, tableName, channelContentId.ChannelId, channelContentId.Id, isTop) == false) { break; } } } } foreach (var distinctChannelId in channelContentIds.Select(x => x.ChannelId).Distinct()) { CreateManager.TriggerContentChangedEvent(siteId, distinctChannelId); } request.AddSiteLog(siteId, channelId, 0, "对内容排序", string.Empty); return(Ok(new { Value = true })); } catch (Exception ex) { LogUtils.AddErrorLog(ex); return(InternalServerError(ex)); } }
public IHttpActionResult Submit() { try { var request = new AuthenticatedRequest(); var siteId = request.GetPostInt("siteId"); var channelId = request.GetPostInt("channelId"); var channelContentIds = MinContentInfo.ParseMinContentInfoList(request.GetPostString("channelContentIds")); var checkedLevel = request.GetPostInt("checkedLevel"); var isTranslate = request.GetPostBool("isTranslate"); var translateChannelId = request.GetPostInt("translateChannelId"); var reasons = request.GetPostString("reasons"); if (!request.IsAdminLoggin || !request.AdminPermissionsImpl.HasChannelPermissions(siteId, channelId, ConfigManager.ChannelPermissions.ContentCheck)) { return(Unauthorized()); } var siteInfo = SiteManager.GetSiteInfo(siteId); if (siteInfo == null) { return(BadRequest("无法确定内容对应的站点")); } var channelInfo = ChannelManager.GetChannelInfo(siteId, channelId); if (channelInfo == null) { return(BadRequest("无法确定内容对应的栏目")); } var isChecked = checkedLevel >= siteInfo.Additional.CheckContentLevel; if (isChecked) { checkedLevel = 0; } var tableName = ChannelManager.GetTableName(siteInfo, channelInfo); var contentInfoList = new List <ContentInfo>(); foreach (var channelContentId in channelContentIds) { var contentChannelInfo = ChannelManager.GetChannelInfo(siteId, channelContentId.ChannelId); var contentInfo = ContentManager.GetContentInfo(siteInfo, contentChannelInfo, channelContentId.Id); if (contentInfo == null) { continue; } contentInfo.Set(ContentAttribute.CheckUserName, request.AdminName); contentInfo.Set(ContentAttribute.CheckDate, DateTime.Now); contentInfo.Set(ContentAttribute.CheckReasons, reasons); contentInfo.IsChecked = isChecked; contentInfo.CheckedLevel = checkedLevel; if (isTranslate && translateChannelId > 0) { var translateChannelInfo = ChannelManager.GetChannelInfo(siteId, translateChannelId); contentInfo.ChannelId = translateChannelInfo.Id; DataProvider.ContentDao.Update(siteInfo, translateChannelInfo, contentInfo); } else { DataProvider.ContentDao.Update(siteInfo, contentChannelInfo, contentInfo); } contentInfoList.Add(contentInfo); var checkInfo = new ContentCheckInfo(0, tableName, siteId, contentInfo.ChannelId, contentInfo.Id, request.AdminName, isChecked, checkedLevel, DateTime.Now, reasons); DataProvider.ContentCheckDao.Insert(checkInfo); } if (isTranslate && translateChannelId > 0) { ContentManager.RemoveCache(tableName, channelId); var translateTableName = ChannelManager.GetTableName(siteInfo, translateChannelId); ContentManager.RemoveCache(translateTableName, translateChannelId); } request.AddSiteLog(siteId, "批量审核内容"); foreach (var contentInfo in contentInfoList) { CreateManager.CreateContent(siteId, contentInfo.ChannelId, contentInfo.Id); } foreach (var distinctChannelId in channelContentIds.Select(x => x.ChannelId).Distinct()) { CreateManager.TriggerContentChangedEvent(siteId, distinctChannelId); } if (isTranslate && translateChannelId > 0) { CreateManager.TriggerContentChangedEvent(siteId, translateChannelId); } return(Ok(new { Value = true })); } catch (Exception ex) { LogUtils.AddErrorLog(ex); return(InternalServerError(ex)); } }
public IHttpActionResult Submit() { try { var request = new AuthenticatedRequest(); var siteId = request.GetPostInt("siteId"); var channelContentIds = MinContentInfo.ParseMinContentInfoList(request.GetPostString("channelContentIds")); var pageType = request.GetPostString("pageType"); var isRecommend = request.GetPostBool("isRecommend"); var isHot = request.GetPostBool("isHot"); var isColor = request.GetPostBool("isColor"); var isTop = request.GetPostBool("isTop"); var hits = request.GetPostInt("hits"); if (!request.IsAdminLoggin) { return(Unauthorized()); } var siteInfo = SiteManager.GetSiteInfo(siteId); if (siteInfo == null) { return(BadRequest("无法确定内容对应的站点")); } if (pageType == "setAttributes") { if (isRecommend || isHot || isColor || isTop) { foreach (var channelContentId in channelContentIds) { var channelInfo = ChannelManager.GetChannelInfo(siteId, channelContentId.ChannelId); var contentInfo = ContentManager.GetContentInfo(siteInfo, channelInfo, channelContentId.Id); if (contentInfo == null) { continue; } if (isRecommend) { contentInfo.IsRecommend = true; } if (isHot) { contentInfo.IsHot = true; } if (isColor) { contentInfo.IsColor = true; } if (isTop) { contentInfo.IsTop = true; } DataProvider.ContentDao.Update(siteInfo, channelInfo, contentInfo); } request.AddSiteLog(siteId, "设置内容属性"); } } else if (pageType == "cancelAttributes") { if (isRecommend || isHot || isColor || isTop) { foreach (var channelContentId in channelContentIds) { var channelInfo = ChannelManager.GetChannelInfo(siteId, channelContentId.ChannelId); var contentInfo = ContentManager.GetContentInfo(siteInfo, channelInfo, channelContentId.Id); if (contentInfo == null) { continue; } if (isRecommend) { contentInfo.IsRecommend = false; } if (isHot) { contentInfo.IsHot = false; } if (isColor) { contentInfo.IsColor = false; } if (isTop) { contentInfo.IsTop = false; } DataProvider.ContentDao.Update(siteInfo, channelInfo, contentInfo); } request.AddSiteLog(siteId, "取消内容属性"); } } else if (pageType == "setHits") { foreach (var channelContentId in channelContentIds) { var channelInfo = ChannelManager.GetChannelInfo(siteId, channelContentId.ChannelId); var contentInfo = ContentManager.GetContentInfo(siteInfo, channelInfo, channelContentId.Id); if (contentInfo == null) { continue; } contentInfo.Hits = hits; DataProvider.ContentDao.Update(siteInfo, channelInfo, contentInfo); } request.AddSiteLog(siteId, "设置内容点击量"); } return(Ok(new { Value = true })); } catch (Exception ex) { LogUtils.AddErrorLog(ex); return(InternalServerError(ex)); } }
public IHttpActionResult GetConfig() { try { var request = new AuthenticatedRequest(); var siteId = request.GetQueryInt("siteId"); var channelId = request.GetQueryInt("channelId"); var channelContentIds = MinContentInfo.ParseMinContentInfoList(request.GetQueryString("channelContentIds")); if (!request.IsAdminLoggin || !request.AdminPermissionsImpl.HasChannelPermissions(siteId, channelId, ConfigManager.ChannelPermissions.ContentTranslate)) { return(Unauthorized()); } var siteInfo = SiteManager.GetSiteInfo(siteId); if (siteInfo == null) { return(BadRequest("无法确定内容对应的站点")); } var channelInfo = ChannelManager.GetChannelInfo(siteId, channelId); if (channelInfo == null) { return(BadRequest("无法确定内容对应的栏目")); } var retVal = new List <Dictionary <string, object> >(); foreach (var channelContentId in channelContentIds) { var contentChannelInfo = ChannelManager.GetChannelInfo(siteId, channelContentId.ChannelId); var contentInfo = ContentManager.GetContentInfo(siteInfo, contentChannelInfo, channelContentId.Id); if (contentInfo == null) { continue; } var dict = contentInfo.ToDictionary(); dict["checkState"] = CheckManager.GetCheckState(siteInfo, contentInfo); retVal.Add(dict); } var sites = new List <object>(); var channels = new List <object>(); var siteIdList = request.AdminPermissionsImpl.GetSiteIdList(); foreach (var permissionSiteId in siteIdList) { var permissionSiteInfo = SiteManager.GetSiteInfo(permissionSiteId); if (permissionSiteInfo == null) { continue; } sites.Add(new { permissionSiteInfo.Id, permissionSiteInfo.SiteName }); } var channelIdList = request.AdminPermissionsImpl.GetChannelIdList(siteInfo.Id, ConfigManager.ChannelPermissions.ContentAdd); foreach (var permissionChannelId in channelIdList) { var permissionChannelInfo = ChannelManager.GetChannelInfo(siteInfo.Id, permissionChannelId); channels.Add(new { permissionChannelInfo.Id, ChannelName = ChannelManager.GetChannelNameNavigation(siteInfo.Id, permissionChannelId) }); } return(Ok(new { Value = retVal, Sites = sites, Channels = channels, Site = siteInfo })); } catch (Exception ex) { LogUtils.AddErrorLog(ex); return(InternalServerError(ex)); } }