Align template API with dictionary API (#13714)

* Align the template services and API with the dictionary ones (use attempt pattern)

* A little controller clean-up

* Mimic old file service behavior, make unit tests happy

* Align CreateForContentTypeAsync return value with the rest of the TemplateService API

* Scaffold endpoint should no longer feature master templates

* Update the OpenAPI JSON
This commit is contained in:
Kenn Jacobsen
2023-01-31 12:20:46 +01:00
committed by GitHub
parent 5f8ef4cfff
commit ac8cfcf634
15 changed files with 604 additions and 197 deletions

View File

@@ -197,4 +197,14 @@ public abstract class UmbracoIntegrationTest : UmbracoIntegrationTestBase
configBuilder.AddConfiguration(GlobalSetupTeardown.TestConfiguration);
}
}
protected void DeleteAllTemplateViewFiles()
{
var fileSystems = GetRequiredService<FileSystems>();
var viewFileSystem = fileSystems.MvcViewsFileSystem!;
foreach (var file in viewFileSystem.GetFiles(string.Empty).ToArray())
{
viewFileSystem.DeleteFile(file);
}
}
}