mirror of
https://github.com/mastodon/mastodon.git
synced 2025-11-27 18:10:58 +00:00
Update app/services/create_collection_service.rb
Co-authored-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
parent
48c33df8bf
commit
82dc11565e
|
|
@ -4,10 +4,7 @@ class CreateCollectionService
|
||||||
def call(params, account)
|
def call(params, account)
|
||||||
tag = params.delete(:tag)
|
tag = params.delete(:tag)
|
||||||
account_ids = params.delete(:account_ids)
|
account_ids = params.delete(:account_ids)
|
||||||
@collection = Collection.new(params)
|
@collection = Collection.new(params.merge({ account:, local: true, tag: find_or_create_tag(tag) }))
|
||||||
@collection.account = account
|
|
||||||
@collection.local = true
|
|
||||||
@collection.tag = find_or_create_tag(tag)
|
|
||||||
build_items(account_ids)
|
build_items(account_ids)
|
||||||
|
|
||||||
@collection.save!
|
@collection.save!
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user