notifications: only provide #index as GET
This commit is contained in:
parent
77529c2217
commit
d572734b96
|
@ -18,7 +18,10 @@
|
|||
|
||||
- if @more_data_available
|
||||
.d-flex.justify-content-center.justify-content-sm-start#paginator
|
||||
= button_to notifications_path(last_id: @notifications_last_id, type: params[:type]), class: "btn btn-light" do
|
||||
= t("voc.load")
|
||||
= button_to t("voc.load"), notifications_path(type: params[:type]),
|
||||
class: "btn btn-light",
|
||||
method: :get,
|
||||
params: { last_id: @notifications_last_id },
|
||||
form: { data: { turbo_stream: true } }
|
||||
|
||||
- provide(:title, generate_title(t(".title")))
|
||||
|
|
|
@ -7,6 +7,8 @@
|
|||
|
||||
= turbo_stream.update "paginator" do
|
||||
- if @more_data_available
|
||||
= button_to notifications_path(last_id: @notifications_last_id, type: params[:type]), class: "btn btn-light" do
|
||||
= t("voc.load")
|
||||
|
||||
= button_to t("voc.load"), notifications_path(type: params[:type]),
|
||||
class: "btn btn-light",
|
||||
method: :get,
|
||||
params: { last_id: @notifications_last_id },
|
||||
form: { data: { turbo_stream: true } }
|
||||
|
|
|
@ -146,7 +146,7 @@ Rails.application.routes.draw do
|
|||
get "/public", to: "timeline#public", as: :public_timeline if APP_CONFIG.dig(:features, :public, :enabled)
|
||||
get "/list/:list_name", to: "timeline#list", as: :list_timeline
|
||||
|
||||
match "/notifications(/:type)", to: "notifications#index", via: [:get, :post], as: :notifications, defaults: { type: "new" }
|
||||
get "/notifications(/:type)", to: "notifications#index", as: :notifications, defaults: { type: "new" }
|
||||
|
||||
post "/inbox/create", to: "inbox#create", as: :inbox_create
|
||||
get "/inbox", to: "inbox#show", as: :inbox
|
||||
|
|
Loading…
Reference in New Issue