diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2018-07-07 21:09:54 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-07 21:09:54 +0200 |
commit | 6b9e03e002ed349fd8b7e2879d599bb75a698eb2 (patch) | |
tree | 95274f35902ac1e997e7bb43ca36e78be89496e2 /app/controllers | |
parent | ef2bcf51d70b035407dffed8c40efee999f18115 (diff) |
Add API method to remove a suggestion (#7978)
DELETE /api/v1/suggestions/:account_id When blocking, remove suggestion from both sides. Muting not affected, since muting is supposed to be invisible to the target.
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/api/v1/suggestions_controller.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/app/controllers/api/v1/suggestions_controller.rb b/app/controllers/api/v1/suggestions_controller.rb index 3abccedd5..9da2b60ae 100644 --- a/app/controllers/api/v1/suggestions_controller.rb +++ b/app/controllers/api/v1/suggestions_controller.rb @@ -13,6 +13,11 @@ class Api::V1::SuggestionsController < Api::BaseController render json: @accounts, each_serializer: REST::AccountSerializer end + def destroy + PotentialFriendshipTracker.remove(current_account.id, params[:id]) + render_empty + end + private def set_accounts |