API for blocking and unblocking
This commit is contained in:
parent
2c9e672ee2
commit
7b9a4af311
10 changed files with 106 additions and 8 deletions
|
@ -24,13 +24,25 @@ class Api::V1::AccountsController < ApiController
|
|||
end
|
||||
|
||||
def follow
|
||||
@follow = FollowService.new.call(current_user.account, @account.acct)
|
||||
FollowService.new.call(current_user.account, @account.acct)
|
||||
set_relationship
|
||||
render action: :relationship
|
||||
end
|
||||
|
||||
def block
|
||||
BlockService.new.call(current_user.account, @account)
|
||||
set_relationship
|
||||
render action: :relationship
|
||||
end
|
||||
|
||||
def unfollow
|
||||
@unfollow = UnfollowService.new.call(current_user.account, @account)
|
||||
UnfollowService.new.call(current_user.account, @account)
|
||||
set_relationship
|
||||
render action: :relationship
|
||||
end
|
||||
|
||||
def unblock
|
||||
UnblockService.new.call(current_user.account, @account)
|
||||
set_relationship
|
||||
render action: :relationship
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue