Is it possible to access router.buildLocation() in a Server Route?
Did a cursory search for buildLocation, and no results returned...but is it possible to access
buildLocation() (or something simillar) on a server route so that I can build a typesafe redirect url?
I can't seem to find a helper function at the moment, am I missing something or do I need to hardcode urls for server routes for now? Thanks a lot!5 Replies
fair-rose•2mo ago
hi, again, please ask in #start-questions
and yes, you can do this
correct-apricotOP•2mo ago
oh for goodness sake, im sorry...again. I thought I was in the right one
fair-rose•2mo ago
you could also just
throw redirect({ to: "/workspace/dashboard" }) i thinkcorrect-apricotOP•2mo ago
thank you for leading me to the helper method, I'll give the throw a shot too. Very much appreciated
(confirmed throw redirect works)
fair-rose•2mo ago
nice