DEV: Remove old ChatController routes for messages & lookup (#21723)

Since 5cce829 and the new
channel view builder, we have no need of these obsolete
routes which have way too much logic in the controller, which
has been superseded by the view builder anyway.

Remove the routes and update the channel message loading to use it.
This commit is contained in:
Martin Brennan
2023-05-29 09:37:10 +02:00
committed by GitHub
parent 7a9514922b
commit 6ddd17a756
11 changed files with 486 additions and 498 deletions

View File

@ -58,14 +58,12 @@ Chat::Engine.routes.draw do
post "/enable" => "chat#enable_chat"
post "/disable" => "chat#disable_chat"
post "/dismiss-retention-reminder" => "chat#dismiss_retention_reminder"
get "/:chat_channel_id/messages" => "chat#messages"
get "/message/:message_id" => "chat#message_link"
put ":chat_channel_id/edit/:message_id" => "chat#edit_message"
put ":chat_channel_id/react/:message_id" => "chat#react"
put "/:chat_channel_id/:message_id/rebake" => "chat#rebake"
post "/:chat_channel_id/:message_id/flag" => "chat#flag"
post "/:chat_channel_id/quote" => "chat#quote_messages"
get "/lookup/:message_id" => "chat#lookup_message"
put "/:chat_channel_id/read/:message_id" => "chat#update_user_last_read"
put "/user_chat_enabled/:user_id" => "chat#set_user_chat_status"
put "/:chat_channel_id/invite" => "chat#invite_users"