moderation/reports: only provide #index as GET
This commit is contained in:
parent
144db471d6
commit
77529c2217
|
@ -4,7 +4,10 @@
|
|||
|
||||
- if @more_data_available
|
||||
.d-flex.justify-content-center.justify-content-sm-start#paginator
|
||||
= button_to moderation_reports_path(last_id: @reports_last_id, type: params[:type]), class: "btn btn-light" do
|
||||
= t("voc.load")
|
||||
= button_to t("voc.load"), moderation_reports_path(type: params[:type]),
|
||||
class: "btn btn-light",
|
||||
method: :get,
|
||||
params: { last_id: @reports_last_id },
|
||||
form: { data: { turbo_stream: true } }
|
||||
|
||||
- parent_layout "moderation"
|
||||
|
|
|
@ -4,5 +4,8 @@
|
|||
|
||||
= turbo_stream.update "paginator" do
|
||||
- if @more_data_available
|
||||
= button_to moderation_reports_path(last_id: @reports_last_id, type: params[:type]), class: "btn btn-light" do
|
||||
= t("voc.load")
|
||||
= button_to t("voc.load"), moderation_reports_path(type: params[:type]),
|
||||
class: "btn btn-light",
|
||||
method: :get,
|
||||
params: { last_id: @reports_last_id },
|
||||
form: { data: { turbo_stream: true } }
|
||||
|
|
|
@ -26,7 +26,7 @@ Rails.application.routes.draw do
|
|||
post "/moderation/unmask", to: "moderation#toggle_unmask", as: :moderation_toggle_unmask
|
||||
get "/moderation/blocks", to: "moderation/anonymous_block#index", as: :mod_anon_block_index
|
||||
get "/moderation/inbox/:user", to: "moderation/inbox#index", as: :mod_inbox_index
|
||||
match "/moderation/reports(/:type)", to: "moderation/reports#index", via: [:get, :post], as: :moderation_reports, defaults: { type: "all" }
|
||||
get "/moderation/reports(/:type)", to: "moderation/reports#index", as: :moderation_reports, defaults: { type: "all" }
|
||||
get "/moderation/questions/:author_identifier", to: "moderation/questions#show", as: :moderation_questions
|
||||
namespace :ajax do
|
||||
post "/mod/destroy_report", to: "moderation#destroy_report", as: :mod_destroy_report
|
||||
|
|
Loading…
Reference in New Issue