Refactor app in to its own slice

This commit is contained in:
2024-02-17 10:40:36 +11:00
parent b809b132d3
commit a6078f882e
161 changed files with 16176 additions and 193 deletions

View File

@@ -0,0 +1,25 @@
module Main
module Views
module Blogroll
class Opml< Main::View
include Deps[blogroll_list: "queries.blogroll.index"]
expose :blogroll do |blogroll_result|
JSON.parse(blogroll_result)["subscriptions"].map do |feed|
{
title: feed["title"],
url: feed["url"],
html_url: feed["htmlUrl"],
icon: feed["iconUrl"],
categories: feed["categories"].map {|cat| cat["label"]}
}
end
end
private_expose :blogroll_result do
blogroll_list.call
end
end
end
end
end