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,17 @@
module Main
module Views
module PastWeek
class Index < Main::View
config.layout = false
include Deps["repos.post_repo"]
expose :past_week do
post_repo.week_posts(limit: 1).to_a.map do |post|
Decorators::Posts::Decorator.new(post)
end.first
end
end
end
end
end