Add emoji to statuses
This commit is contained in:
18
slices/main/actions/feeds/statuses_json.rb
Normal file
18
slices/main/actions/feeds/statuses_json.rb
Normal file
@@ -0,0 +1,18 @@
|
||||
module Main
|
||||
module Actions
|
||||
module Feeds
|
||||
class StatusesJSON < Action
|
||||
include Deps["views.feeds.statuses_json", "repos.post_repo"]
|
||||
|
||||
def handle(req, res)
|
||||
posts = post_repo.statuses_for_rss.map do |post|
|
||||
Decorators::Posts::Decorator.new(post).to_h
|
||||
end
|
||||
|
||||
res.content_type = "application/json; charset=utf-8"
|
||||
res.body = JSON.generate(posts, quirks_mode: true)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user