Fix constraints typo in routes config (#17994)

This commit is contained in:
Stephen White 2022-08-23 23:27:05 -03:00 committed by GitHub
parent 3068df4cea
commit 6771673a1b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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+/ }