Jason Han
02/25/2022, 7:16 AMrouting {
someRoute1()
someRoute2()
...
someRoute100()
}
with each group of routes in it's own file
fun Application.someRoute1() {
routing {
route('/some/{place}') {
head {
}
get {
}
}
}
}
however, we now want to add authentication to all routes, but if we add the authenticate function to the first example,
routing {
authenticate {
someRoute1()
someRoute2()
...
someRoute100()
}
}
it doesn't seem like the individual route functions get the authenticate function. Is there a way to do this without manually editing each individual route file?ishitatsuyuki
02/25/2022, 7:43 AMRoute.routesFoo
and removing routing {}
from the individual functionsJason Han
02/25/2022, 7:49 AMJason Han
02/25/2022, 7:50 AMHiranyey Gajbhiye
03/03/2022, 3:11 AM