Merge pull request 'devel' (#240) from devel into main

Reviewed-on: #240
This commit is contained in:
inhji 2023-07-29 16:53:18 +02:00
commit ace9b269c1

View file

@ -65,10 +65,8 @@ defmodule ChiyaWeb.PageController do
end end
def wiki(conn, _params) do def wiki(conn, _params) do
settings = conn.assigns.settings
[channel, notes_updated, notes_published] = [channel, notes_updated, notes_published] =
case settings.wiki_channel_id do case conn.assigns.settings.wiki_channel_id do
nil -> nil ->
[nil, nil, nil] [nil, nil, nil]
@ -95,11 +93,11 @@ defmodule ChiyaWeb.PageController do
id -> id ->
channel = Chiya.Channels.get_channel!(id) channel = Chiya.Channels.get_channel!(id)
notes = Chiya.Notes.list_notes_by_channel_updated(channel, 5) notes = Chiya.Notes.list_notes_by_channel_updated(channel, 999)
[channel, notes] [channel, notes]
end end
render(conn, :wiki, render(conn, :bookmarks,
channel: channel, channel: channel,
notes: notes, notes: notes,
page_title: "Bookmarks" page_title: "Bookmarks"