Add `Moderation::QuestionsController`
This commit is contained in:
parent
6f19d806f7
commit
778cf90f85
|
@ -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
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue