routing-controllers
routing-controllers copied to clipboard
Problems with redirect annotation
I have a controller method decorated with @Redirect("https://some.where/?:id")
that returns an object that interpolates id of the mentioned string. The problem is when I try to run a test (Jest/Supertest )on this endpoint - it returns correct(?) status (302 (Found)) but the response object contains strings that are not interpolated with returned ID (response: {text:https://some.where/?:id , Header: {'location': https://some.where/?:id}, ...}
is it possible to get the actual end URL of the redirect? Is it express thing or typedi?.
EDIT: Resolved by using res.redirect