diff options
author | Claire <claire.github-309c@sitedethib.com> | 2022-11-10 13:27:40 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-10 13:27:40 +0100 |
commit | ee7e49d1b1323618e16026bc8db8ab7f9459cc2d (patch) | |
tree | 86d51ac7c13d2b08fae534a44524c2ef8b131315 /app/controllers/api/v1/tags_controller.rb | |
parent | b2a25d446a9f4368ad9d1240b9da30bc33942da5 (diff) | |
parent | c4d2c729245fab1dda31d0de73be9bc03217b06a (diff) |
Merge pull request #1910 from ClearlyClaire/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'app/controllers/api/v1/tags_controller.rb')
-rw-r--r-- | app/controllers/api/v1/tags_controller.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/api/v1/tags_controller.rb b/app/controllers/api/v1/tags_controller.rb index 9e5c53330..32f71bdce 100644 --- a/app/controllers/api/v1/tags_controller.rb +++ b/app/controllers/api/v1/tags_controller.rb @@ -24,7 +24,7 @@ class Api::V1::TagsController < Api::BaseController private def set_or_create_tag - return not_found unless /\A(#{Tag::HASHTAG_NAME_RE})\z/.match?(params[:id]) + return not_found unless Tag::HASHTAG_NAME_RE.match?(params[:id]) @tag = Tag.find_normalized(params[:id]) || Tag.new(name: Tag.normalize(params[:id]), display_name: params[:id]) end end |