Add more endpoints for now page
This commit is contained in:
15
slices/main/actions/past_week/index.rb
Normal file
15
slices/main/actions/past_week/index.rb
Normal 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
|
15
slices/main/actions/recently_played_games/index.rb
Normal file
15
slices/main/actions/recently_played_games/index.rb
Normal 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
|
Reference in New Issue
Block a user