Avoid double render in posts index

This commit is contained in:
2024-03-16 20:48:56 +11:00
parent 546c51ed4f
commit 199bdcae85

View File

@@ -6,8 +6,7 @@ module Main
def handle(req, res)
res.body = cache(key: "posts_index",
params: [req.params[:q]],
content_proc: ->(q) { res.render index, query: q })
res.status = 200
content_proc: ->(q) { index.call(context: Main::Views::Context.new(request: req), query: q) })
end
end
end