diff --git a/app/controllers/moderation/questions_controller.rb b/app/controllers/moderation/questions_controller.rb new file mode 100644 index 00000000..7b9aa219 --- /dev/null +++ b/app/controllers/moderation/questions_controller.rb @@ -0,0 +1,9 @@ +# frozen_string_literal: true + +class Moderation::QuestionsController < ApplicationController + before_action :authenticate_user! + + def index + @questions = Question.where(author_identifier: params[:author_identifier]) + end +end diff --git a/config/routes.rb b/config/routes.rb index 4d5ae874..49ac0b66 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -26,6 +26,7 @@ Rails.application.routes.draw do get "/moderation/blocks", to: "moderation/anonymous_block#index", as: :mod_anon_block_index get "/moderation/reports(/:type)", to: "moderation/reports#index", as: :moderation_reports, defaults: { type: "all" } get "/moderation/inbox/:user", to: "moderation/inbox#index", as: :mod_inbox_index + get "/moderation/questions/:author_identifier", to: "moderation/questions#index", as: :moderation_questions namespace :ajax do post "/mod/destroy_report", to: "moderation#destroy_report", as: :mod_destroy_report post "/mod/privilege", to: "moderation#privilege", as: :mod_privilege