https://kotlinlang.org logo
#ktor
Title
# ktor
k

kevin

02/12/2019, 7:31 AM
Is there a way in Ktor to have multiple routes go to the same handler. For example I’d like “/api/todos” and /api/v1/todos” to be the same branch of the tree?
s

spand

02/12/2019, 7:36 AM
Extract the code to a function and call in both
✔️ 3
k

kevin

02/12/2019, 4:40 PM
Sure. But I was wondering if there was a way of doing this in the route setup
s

spand

02/13/2019, 8:12 AM
Why isnt it possible in the route setup?