mirror of
https://github.com/Retrospring/retrospring.git
synced 2025-02-23 04:13:03 +01:00
moderation/reports: only provide #index as GET
This commit is contained in:
parent
144db471d6
commit
77529c2217
3 changed files with 11 additions and 5 deletions
|
@ -4,7 +4,10 @@
|
||||||
|
|
||||||
- if @more_data_available
|
- if @more_data_available
|
||||||
.d-flex.justify-content-center.justify-content-sm-start#paginator
|
.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
|
= button_to t("voc.load"), moderation_reports_path(type: params[:type]),
|
||||||
= t("voc.load")
|
class: "btn btn-light",
|
||||||
|
method: :get,
|
||||||
|
params: { last_id: @reports_last_id },
|
||||||
|
form: { data: { turbo_stream: true } }
|
||||||
|
|
||||||
- parent_layout "moderation"
|
- parent_layout "moderation"
|
||||||
|
|
|
@ -4,5 +4,8 @@
|
||||||
|
|
||||||
= turbo_stream.update "paginator" do
|
= turbo_stream.update "paginator" do
|
||||||
- if @more_data_available
|
- if @more_data_available
|
||||||
= button_to moderation_reports_path(last_id: @reports_last_id, type: params[:type]), class: "btn btn-light" do
|
= button_to t("voc.load"), moderation_reports_path(type: params[:type]),
|
||||||
= t("voc.load")
|
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
|
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/blocks", to: "moderation/anonymous_block#index", as: :mod_anon_block_index
|
||||||
get "/moderation/inbox/:user", to: "moderation/inbox#index", as: :mod_inbox_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
|
get "/moderation/questions/:author_identifier", to: "moderation/questions#show", as: :moderation_questions
|
||||||
namespace :ajax do
|
namespace :ajax do
|
||||||
post "/mod/destroy_report", to: "moderation#destroy_report", as: :mod_destroy_report
|
post "/mod/destroy_report", to: "moderation#destroy_report", as: :mod_destroy_report
|
||||||
|
|
Loading…
Reference in a new issue