lib/chiya_web/controllers/page_controller.ex aktualisiert
This commit is contained in:
parent
6ad008865e
commit
39fc4fed7d
1 changed files with 19 additions and 0 deletions
|
@ -86,4 +86,23 @@ defmodule ChiyaWeb.PageController do
|
|||
page_title: "Wiki"
|
||||
)
|
||||
end
|
||||
|
||||
def bookmarks(conn, _params) do
|
||||
[channel, notes] =
|
||||
case conn.assigns.settings.wiki_channel_id do
|
||||
nil ->
|
||||
[nil, nil]
|
||||
|
||||
id ->
|
||||
channel = Chiya.Channels.get_channel!(id)
|
||||
notes = Chiya.Notes.list_notes_by_channel_updated(channel, 5)
|
||||
[channel, notes]
|
||||
end
|
||||
|
||||
render(conn, :wiki,
|
||||
channel: channel,
|
||||
notes: notes,
|
||||
page_title: "Bookmarks"
|
||||
)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue