timeline: only provide #index, #public and #list as GET
This commit is contained in:
parent
9e25a36196
commit
59d94d7ba0
|
@ -4,8 +4,11 @@
|
|||
|
||||
- if @more_data_available
|
||||
.d-flex.justify-content-center#paginator
|
||||
= button_to "#{request.path}?last_id=#{@timeline_last_id}", class: "btn btn-light" do
|
||||
= t("voc.load")
|
||||
= button_to t("voc.load"), request.path,
|
||||
class: "btn btn-light",
|
||||
method: :get,
|
||||
params: { last_id: @timeline_last_id },
|
||||
form: { data: { turbo_stream: true } }
|
||||
|
||||
- provide(:title, @title || APP_CONFIG["site_name"])
|
||||
- parent_layout 'feed'
|
||||
|
|
|
@ -4,5 +4,8 @@
|
|||
|
||||
= turbo_stream.update "paginator" do
|
||||
- if @more_data_available
|
||||
= button_to "#{request.path}?last_id=#{@timeline_last_id}", class: "btn btn-light" do
|
||||
= t("voc.load")
|
||||
= button_to t("voc.load"), request.path,
|
||||
class: "btn btn-light",
|
||||
method: :get,
|
||||
params: { last_id: @timeline_last_id },
|
||||
form: { data: { turbo_stream: true } }
|
||||
|
|
|
@ -40,7 +40,7 @@ Rails.application.routes.draw do
|
|||
end
|
||||
|
||||
authenticate :user do
|
||||
root to: "timeline#index", via: [:get, :post], as: :timeline
|
||||
root to: "timeline#index", via: :get, as: :timeline
|
||||
end
|
||||
|
||||
get "/about", to: "about#about"
|
||||
|
@ -143,8 +143,8 @@ Rails.application.routes.draw do
|
|||
resource :anonymous_block, controller: :anonymous_block, only: %i[create destroy]
|
||||
|
||||
get "/discover", to: "discover#index", as: :discover
|
||||
match "/public", to: "timeline#public", via: [:get, :post], as: :public_timeline if APP_CONFIG.dig(:features, :public, :enabled)
|
||||
match "/list/:list_name", to: "timeline#list", via: [:get, :post], as: :list_timeline
|
||||
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" }
|
||||
|
||||
|
|
Loading…
Reference in New Issue