Reformat code

ex-upload
Marcin Kulik 7 years ago
parent 5971f03c0b
commit f34b9707f3

@ -18,8 +18,7 @@ defmodule Asciinema.Auth do
[username, password] <- String.split(username_password, ":") do
{username, password}
else
_ ->
nil
_ -> nil
end
end
end

@ -39,8 +39,7 @@ defmodule Asciinema.Users do
{:ok, %ApiToken{}} <- Repo.insert(api_token_changeset) do
user
else
_otherwise ->
Repo.rollback(nil)
_otherwise -> Repo.rollback(nil)
end
end)
@ -52,6 +51,8 @@ defmodule Asciinema.Users do
end
def revoke_api_token!(api_token) do
Repo.update!(ApiToken.revoke_changeset(api_token))
api_token
|> ApiToken.revoke_changeset
|> Repo.update!
end
end

Loading…
Cancel
Save