Fixes: #U4-2343 for api controllers, already fixed for surface controllers
This commit is contained in:
@@ -209,9 +209,8 @@ namespace Umbraco.Web
|
||||
var meta = PluginController.GetMetadata(controller);
|
||||
var route = RouteTable.Routes.MapHttpRoute(
|
||||
string.Format("umbraco-{0}-{1}", "api", meta.ControllerName),
|
||||
umbracoPath + "/Api/" + meta.ControllerName + "/{action}/{id}",//url to match
|
||||
new { controller = meta.ControllerName, id = UrlParameter.Optional },
|
||||
new { controller = @"(\w+)Api" }); //Must be suffixed with "Api" (i.e. MyApiController)
|
||||
umbracoPath + "/Api/" + meta.ControllerName + "/{action}/{id}", //url to match
|
||||
new {controller = meta.ControllerName, id = UrlParameter.Optional});
|
||||
//web api routes don't set the data tokens object
|
||||
if (route.DataTokens == null)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user