Add more endpoints for now page

This commit is contained in:
2024-04-01 19:13:18 +11:00
parent 23bc0134d6
commit cbdc61c359
13 changed files with 128 additions and 28 deletions

View File

@@ -0,0 +1,15 @@
require "time_math"
module Main
module Actions
module PastWeek
class Index < Action
include Deps["views.past_week.index"]
def handle(req, res)
res.body = cache(key: "past_week", content_proc: -> { index.call.to_str })
end
end
end
end
end

View File

@@ -0,0 +1,15 @@
require "time_math"
module Main
module Actions
module RecentlyPlayedGames
class Index < Action
include Deps["views.recently_played_games.index"]
def handle(req, res)
res.body = cache(key: "recently_played_games", content_proc: -> { index.call.to_str })
end
end
end
end
end