andrewoma
01/17/2017, 1:12 AMroute("api") {
authentication {
intercept(AuthenticationPipeline.RequestAuthentication) { context ->
if (context.call.sessionOrNull<Session>() == null) {
context.call.respond(UnauthorizedResponse(*emptyArray()))
}
}
}
crud("users", stores.users)
}