Skip to content

Commit

Permalink
Add support for absolute action routes, closes #843
Browse files Browse the repository at this point in the history
  • Loading branch information
RicoSuter committed Jul 12, 2017
1 parent 37bf33b commit ad2b67a
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,12 @@ private IEnumerable<string> GetHttpPaths(Type controllerType, MethodInfo method)
else if (routePrefixAttribute != null)
httpPaths.Add(routePrefixAttribute.Prefix + "/" + attribute.Template);
else if (routeAttributeOnClass != null)
httpPaths.Add(routeAttributeOnClass.Template + "/" + attribute.Template);
{
if (attribute.Template.StartsWith("/"))
httpPaths.Add(attribute.Template);
else
httpPaths.Add(routeAttributeOnClass.Template + "/" + attribute.Template);
}
else
httpPaths.Add(attribute.Template);
}
Expand Down

0 comments on commit ad2b67a

Please sign in to comment.