Remove credo and use mix format, and lint everything

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2018-07-27 10:45:35 +02:00
parent df3f08c528
commit 979aad5acb
104 changed files with 2278 additions and 1487 deletions

View File

@@ -2,10 +2,12 @@ defmodule EventosWeb.Guardian do
@moduledoc """
Handles the JWT tokens encoding and decoding
"""
use Guardian, otp_app: :eventos, permissions: %{
superuser: [:moderate, :super],
user: [:base]
}
use Guardian,
otp_app: :eventos,
permissions: %{
superuser: [:moderate, :super],
user: [:base]
}
alias Eventos.Actors
alias Eventos.Actors.User
@@ -23,6 +25,7 @@ defmodule EventosWeb.Guardian do
case Integer.parse(uid_str) do
{uid, ""} ->
{:ok, Actors.get_user_with_actor!(uid)}
_ ->
{:error, :invalid_id}
end