1
0
Fork 1
forked from fedi/mastodon

Make tag following idempotent (#20860)

This commit is contained in:
trwnh 2022-11-17 03:55:59 -06:00 committed by talon
parent 65b8f5f5d0
commit 76909b3674

View file

@ -12,7 +12,7 @@ class Api::V1::TagsController < Api::BaseController
end
def follow
TagFollow.create!(tag: @tag, account: current_account, rate_limit: true)
TagFollow.first_or_create!(tag: @tag, account: current_account, rate_limit: true)
render json: @tag, serializer: REST::TagSerializer
end