Only show pipelines for the current user
This commit is contained in:
parent
e429d256d6
commit
929614dab2
|
@ -67,11 +67,12 @@ defmodule FrenzyWeb.FeedController do
|
||||||
end
|
end
|
||||||
|
|
||||||
def edit(conn, _params) do
|
def edit(conn, _params) do
|
||||||
|
user = conn.assigns[:user]
|
||||||
feed = conn.assigns[:feed]
|
feed = conn.assigns[:feed]
|
||||||
edit_changeset = Feed.changeset(feed, %{})
|
edit_changeset = Feed.changeset(feed, %{})
|
||||||
|
|
||||||
pipelines =
|
pipelines =
|
||||||
Repo.all(Pipeline)
|
Repo.all(from p in Pipeline, where: p.user_id == ^user.id)
|
||||||
|> Enum.map(fn pipeline -> {pipeline.name, pipeline.id} end)
|
|> Enum.map(fn pipeline -> {pipeline.name, pipeline.id} end)
|
||||||
|
|
||||||
render(conn, "edit.html", %{
|
render(conn, "edit.html", %{
|
||||||
|
|
Loading…
Reference in New Issue