Browse Source

chore: mix format

main
Inhji Y. 3 months ago
parent
commit
7ca2aceff3
  1. 31
      lib/mirage/notes.ex
  2. 2
      lib/mirage_web/live/inbox_live/item_component.ex

31
lib/mirage/notes.ex

@ -124,21 +124,22 @@ defmodule Mirage.Notes do
where: n.title == ^date_title,
select: n
note = case Repo.one(q) do
%Note{} = note ->
[note]
nil ->
template = Mirage.Settings.get_setting_by_name!("daily_template")
{:ok, note} =
create_note(%{
title: date_title,
content: template.value
})
[note]
end
note =
case Repo.one(q) do
%Note{} = note ->
[note]
nil ->
template = Mirage.Settings.get_setting_by_name!("daily_template")
{:ok, note} =
create_note(%{
title: date_title,
content: template.value
})
[note]
end
note |> preload_note()
end

2
lib/mirage_web/live/inbox_live/item_component.ex

@ -1,5 +1,5 @@
defmodule MirageWeb.InboxLive.ItemComponent do
use MirageWeb, :live_component
use MirageWeb, :live_component
def render(assigns) do
~L"""

Loading…
Cancel
Save