more changes
This commit is contained in:
parent
beaf92f7c4
commit
a3a4af7965
18 changed files with 165 additions and 24 deletions
14
lib/ezcontainer_railway/projects.ex
Normal file
14
lib/ezcontainer_railway/projects.ex
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
defmodule EzcontainerRailway.Projects do
|
||||
import Ecto.Query
|
||||
|
||||
alias EzcontainerRailway.Repo
|
||||
alias EzcontainerRailway.Project
|
||||
|
||||
def get_project_by_user_id(user_id) do
|
||||
Repo.one(
|
||||
from p in Project,
|
||||
where: p.user_id == ^user_id,
|
||||
limit: 1
|
||||
)
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue