Let's say we need to get the ShoppingCart class from a request using sessions. What code should we write in the appropriate place?
get("/cart") {
val session = // getting session here
session ?: throw Exception("Unauthorized")
}Let's say we need to get the ShoppingCart class from a request using sessions. What code should we write in the appropriate place?
get("/cart") {
val session = // getting session here
session ?: throw Exception("Unauthorized")
}Create a free account to access the full topic