Skip to content

Commit

Permalink
mix format!! 🤦‍♂️
Browse files Browse the repository at this point in the history
  • Loading branch information
nelsonic committed Aug 31, 2023
1 parent 7ef0509 commit a386f98
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
3 changes: 2 additions & 1 deletion lib/app/cid.ex
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ defmodule App.Cid do
changeset
else
# Only add cid to changeset that has :name i.e. list.name or :text i.e. item.text
if Map.has_key?(changeset.changes, :name) || Map.has_key?(changeset.changes, :text) do
if Map.has_key?(changeset.changes, :name) ||
Map.has_key?(changeset.changes, :text) do
cid = Cid.cid(changeset.changes)
%{changeset | changes: Map.put(changeset.changes, :cid, cid)}
else
Expand Down
1 change: 0 additions & 1 deletion lib/app/item.ex
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,6 @@ defmodule App.Item do
list_person_items(person_id)
|> Enum.reduce(%{}, fn i, acc -> Map.put(acc, i.id, i) end)


accumulate_item_timers(values, seq)
|> Enum.map(fn t ->
if t != nil do
Expand Down
8 changes: 7 additions & 1 deletion lib/app_web/live/app_live.ex
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,13 @@ defmodule AppWeb.AppLive do

# need to restrict getting items to the people who own or have rights to access them!
item = Item.get_item!(Map.get(data, "id"))
Item.update_item(item, %{status: status, person_id: person_id, cid: item.cid})

Item.update_item(item, %{
status: status,
person_id: person_id,
cid: item.cid
})

Timer.stop_timer_for_item_id(item.id)

AppWeb.Endpoint.broadcast(@topic, "update", :toggle)
Expand Down

0 comments on commit a386f98

Please sign in to comment.