Implementation of a basic auth logic via API #2
@ -3,6 +3,7 @@ defmodule DrainCloudCore.UsersRepo do
|
||||
import Ecto.Query
|
||||
|
||||
def password_by_login(login) do
|
||||
Repo.all(from u in :users, where: u.login = login, select: u.password, limit: 1)
|
||||
query = from u in :users, where: u.login = login, select: u.password, limit: 1
|
||||
Repo.all(query)
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user