5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-26 01:06:21 +00:00
panel/app/controllers/moderation_queue_controller.rb

27 lines
947 B
Ruby
Raw Normal View History

# frozen_string_literal: true
# Cola de moderación de ActivityPub
class ModerationQueueController < ApplicationController
2024-03-05 19:24:16 +00:00
include ModerationFiltersConcern
before_action :authenticate_usuarie!
breadcrumb -> { current_usuarie.email }, :edit_usuarie_registration_path
breadcrumb 'sites.index', :sites_path, match: :exact
2024-03-14 15:21:50 +00:00
# Cola de moderación viendo todo el sitio
def index
2024-03-21 21:12:12 +00:00
authorize ModerationQueue.new(site)
2024-03-16 14:32:16 +00:00
breadcrumb site.title, site_posts_path(site)
2024-03-15 15:23:04 +00:00
breadcrumb I18n.t('moderation_queue.index.title'), ''
2024-03-21 21:12:12 +00:00
site.moderation_checked!
# @todo cambiar el estado por query
@activity_pubs = site.activity_pubs
@instance_moderations = rubanok_process(site.instance_moderations, with: InstanceModerationProcessor)
@actor_moderations = rubanok_process(site.actor_moderations, with: ActorModerationProcessor)
2024-03-04 14:59:29 +00:00
@moderation_queue = rubanok_process(site.activity_pubs, with: ActivityPubProcessor)
end
end