diff options
author | Claire <claire.github-309c@sitedethib.com> | 2022-07-22 09:58:35 +0200 |
---|---|---|
committer | Claire <claire.github-309c@sitedethib.com> | 2022-07-22 09:58:35 +0200 |
commit | d799fe208233d0c564736021de34c184c17f23e3 (patch) | |
tree | b1e22aa3ea75bc6a9e466dd717ce21e0834975d3 /app/controllers | |
parent | 0a61b000e3f10e9be3d8ae1cccf53caa3877a55a (diff) | |
parent | 76ff45230630c32dd01fd45c89557e092a81b27f (diff) |
Merge branch 'main' into glitch-soc/merge-upstream
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/api/v1/tags_controller.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/app/controllers/api/v1/tags_controller.rb b/app/controllers/api/v1/tags_controller.rb index d45015ff5..9e5c53330 100644 --- a/app/controllers/api/v1/tags_controller.rb +++ b/app/controllers/api/v1/tags_controller.rb @@ -24,6 +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]) @tag = Tag.find_normalized(params[:id]) || Tag.new(name: Tag.normalize(params[:id]), display_name: params[:id]) end end |