mirror of
https://github.com/yingziwu/mastodon.git
synced 2026-02-22 02:03:18 +00:00
Make tag following idempotent (#20860)
This commit is contained in:
parent
72618ebf03
commit
7fdeed5fbc
1 changed files with 1 additions and 1 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue