Add extra check (#12075)
Co-authored-by: Nikolaj Geisle <niko737@edu.ucl.dk>
This commit is contained in:
@@ -24,7 +24,7 @@ namespace Umbraco.Extensions
|
||||
/// <returns></returns>
|
||||
public static string GetControllerName(Type controllerType)
|
||||
{
|
||||
if (!controllerType.Name.EndsWith("Controller"))
|
||||
if (!controllerType.Name.EndsWith("Controller") && !controllerType.Name.EndsWith("Controller`1"))
|
||||
{
|
||||
throw new InvalidOperationException("The controller type " + controllerType + " does not follow conventions, MVC Controller class names must be suffixed with the term 'Controller'");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user