Fix some typespecs

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2022-04-18 14:38:57 +02:00
parent 714e9216c1
commit 83f2880dd9
33 changed files with 76 additions and 60 deletions

View File

@@ -345,7 +345,7 @@ defmodule Mobilizon.GraphQL.Resolvers.Admin do
end
end
@spec change_role(User.t(), Mobilizon.Users.UserRole.t(), boolean()) ::
@spec change_role(User.t(), atom(), boolean()) ::
{:ok, User.t()} | {:error, String.t() | Ecto.Changeset.t()}
defp change_role(%User{role: old_role} = user, new_role, notify) do
if old_role != new_role do