Changed Url.Link to Url.Route

When running on a different port then port 80, an incorrect path to all
services was returned, as it returned domain and no port number in the
url, this changes it so it only returns the path without domain or port
number
This commit is contained in:
perploug
2013-10-23 13:20:25 +02:00
parent 69a0de20d7
commit 45cf5d88cf
2 changed files with 5 additions and 5 deletions

View File

@@ -84,11 +84,11 @@ namespace Umbraco.Web
routeName = string.Format("umbraco-{0}-{1}", "api", controllerName);
if (id == null)
{
return url.Link(routeName, new {controller = controllerName, action = actionName});
return url.Route(routeName, new { controller = controllerName, action = actionName, httproute = "" });
}
else
{
return url.Link(routeName, new {controller = controllerName, action = actionName, id = id});
return url.Route(routeName, new { controller = controllerName, action = actionName, id = id, httproute = "" });
}
}
else
@@ -96,11 +96,11 @@ namespace Umbraco.Web
routeName = string.Format("umbraco-{0}-{1}-{2}", "api", area, controllerName);
if (id == null)
{
return url.Link(routeName, new {controller = controllerName, action = actionName});
return url.Route(routeName, new { controller = controllerName, action = actionName, httproute = "" });
}
else
{
return url.Link(routeName, new { controller = controllerName, action = actionName, id = id });
return url.Route(routeName, new { controller = controllerName, action = actionName, id = id, httproute = "" });
}
}
}