2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-09-06 10:50:21 +08:00

DEV: Deprecate unused route instead of removing it. (#14030)

We'll no longer use this route, so we'll return a 301 with the new URL just in case someone is still using it.
This commit is contained in:
Roman Rizzi 2021-08-12 15:54:14 -03:00 committed by GitHub
parent 65f6d46045
commit 54ad0ecc72
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 0 deletions

View file

@ -564,6 +564,7 @@ Discourse::Application.routes.draw do
get "posts/:id/reply-ids" => "posts#reply_ids"
get "posts/:id/reply-ids/all" => "posts#all_reply_ids"
get "posts/:username/deleted" => "posts#deleted_posts", constraints: { username: RouteFormat.username }
get "posts/:username/flagged" => "posts#flagged_posts", constraints: { username: RouteFormat.username }
%w{groups g}.each do |root_path|
resources :groups, id: RouteFormat.username, path: root_path do