Files
adamantium/slices/main/actions/posts/index.rb
2024-03-22 08:48:47 +11:00

15 lines
376 B
Ruby

module Main
module Actions
module Posts
class Index < Action
include Deps["views.posts.index"]
def handle(req, res)
res.body = cache(key: "posts_index",
params: [req.params[:q]],
content_proc: ->(q) { index.call(context: Main::Views::Context.new(request: req), query: q) })
end
end
end
end
end