inbox: only provide #show as GET

This commit is contained in:
Georg Gadinger 2023-01-18 08:11:00 +01:00
parent 16bba0b7f0
commit 2f82e3be31
3 changed files with 3 additions and 5 deletions

View file

@ -7,5 +7,4 @@
- if @more_data_available
.d-flex.justify-content-center#paginator
= button_to inbox_path(last_id: @inbox_last_id), class: "btn btn-light" do
= t("voc.load")
= button_to t("voc.load"), inbox_path, class: "btn btn-light", method: :get, params: { last_id: @inbox_last_id }, form: { data: { "turbo-stream" => true } }

View file

@ -4,5 +4,4 @@
= turbo_stream.update "paginator" do
- if @more_data_available
= button_to t("voc.load"), inbox_path(last_id: @inbox_last_id), class: "btn btn-light"
= button_to t("voc.load"), inbox_path, class: "btn btn-light", method: :get, params: { last_id: @inbox_last_id }, form: { data: { "turbo-stream" => true } }

View file

@ -149,7 +149,7 @@ Rails.application.routes.draw do
match "/notifications(/:type)", to: "notifications#index", via: [:get, :post], as: :notifications, defaults: { type: "new" }
post "/inbox/create", to: "inbox#create", as: :inbox_create
match "/inbox(/:author)", via: [:get, :post], to: "inbox#show", as: :inbox
get "/inbox", to: "inbox#show", as: :inbox
match "/user/:username(/p/:page)", to: "user#show", via: [:get, :post], defaults: { page: 1 }
match "/@:username(/p/:page)", to: "user#show", via: [:get, :post], as: :user, defaults: { page: 1 }