Closed gregveres closed 3 years ago
I think you will see this when you look at the code, but I just realized that the bug is deeper than just not looking at the RoutePrefix attribute. In the example I gave above, I was wrong on what the real Url should be because the Route attribute has parameter. So the real Url should be:
api/AdServer/AdImage/{adId}/image/?userId=${userId}
@NeVeSpl Thank you for this fix. It makes the Action.Url much, much better.
I am going through and comparing a bunch of urls from Typewriter to NTypewriter with this fix. There is one case that has jumped out. I will open a new issue for that case. I want to do more investigation to see if I can figure out what is really triggering it. Oh, it might be the second optional parameter isn't being picked up or something.
I have the following class:
When I call Action.Url method for the GetImage method, the return value is:
?adId=${adId}&userId=${userId}
But the real Url should be:
api/AdServer/AdImage/?adId=${adId}&userId=${userId}
The issue is that the RoutePrefix attribute on the class isn't being taken into consideration when building the Url.