From 6771673a1b30c1340a9fdb8b9f971e5a190f2bef Mon Sep 17 00:00:00 2001 From: Stephen White Date: Tue, 23 Aug 2022 23:27:05 -0300 Subject: [PATCH] Fix constraints typo in routes config (#17994) --- config/routes.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/routes.rb b/config/routes.rb index 49c00253646..f5eccd9af5e 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -828,7 +828,7 @@ Discourse::Application.routes.draw do # Topic routes get "t/id_for/:slug" => "topics#id_for_slug" - get "t/external_id/:external_id" => "topics#show_by_external_id", format: :json, constrains: { external_id: /\A[\w-]+\z/ } + get "t/external_id/:external_id" => "topics#show_by_external_id", format: :json, constraints: { external_id: /[\w-]+/ } get "t/:slug/:topic_id/print" => "topics#show", format: :html, print: 'true', constraints: { topic_id: /\d+/ } get "t/:slug/:topic_id/wordpress" => "topics#wordpress", constraints: { topic_id: /\d+/ } get "t/:topic_id/wordpress" => "topics#wordpress", constraints: { topic_id: /\d+/ }