Fix various issues reported by Dializer

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2022-01-06 18:48:48 +01:00
parent 1319985047
commit 26b1ea401a
12 changed files with 27 additions and 25 deletions

View File

@@ -69,7 +69,8 @@ defmodule Mobilizon.GraphQL.API.Follows do
)
case Actors.check_follow(follower, followed) do
%Follower{approved: false} ->
%Follower{approved: false} = follow ->
Actors.delete_follower(follow)
{:error, "Follow already rejected"}
%Follower{} = follow ->