Merge remote-tracking branch 'origin/v8/dev' into v9/feature/merge-v8_29-10-2021

# Conflicts:
#	src/Umbraco.Core/Persistence/NPocoDatabaseExtensions-Bulk.cs
#	src/Umbraco.Web.UI.Client/package.json
#	src/Umbraco.Web.UI.Client/src/views/common/overlays/user/user.html
#	src/Umbraco.Web.UI.Client/src/views/content/overlays/publish.html
#	src/Umbraco.Web.UI.Client/src/views/documenttypes/importdocumenttype.html
#	src/Umbraco.Web.UI/umbraco/config/lang/en.xml
#	src/Umbraco.Web.UI/umbraco/config/lang/en_us.xml
#	src/Umbraco.Web.UI/umbraco/config/lang/nl.xml
This commit is contained in:
Bjarke Berg
2021-10-29 09:52:39 +02:00
64 changed files with 669 additions and 496 deletions

View File

@@ -1026,6 +1026,15 @@ namespace Umbraco.Cms.Web.BackOffice.Controllers
case UmbracoEntityTypes.Macro:
case UmbracoEntityTypes.Template:
var template = Services.FileService.GetTemplate(key);
if (template is null)
{
throw new HttpResponseException(HttpStatusCode.NotFound);
}
return Mapper.Map<ITemplate, EntityBasic>(template);
default:
throw new NotSupportedException("The " + typeof(EntityController) +
" does not currently support data for the type " + entityType);
@@ -1059,6 +1068,15 @@ namespace Umbraco.Cms.Web.BackOffice.Controllers
case UmbracoEntityTypes.Macro:
case UmbracoEntityTypes.Template:
var template = Services.FileService.GetTemplate(id);
if (template is null)
{
throw new HttpResponseException(HttpStatusCode.NotFound);
}
return Mapper.Map<ITemplate, EntityBasic>(template);
default:
throw new NotSupportedException("The " + typeof(EntityController) +
" does not currently support data for the type " + entityType);