Skip to content

Commit

Permalink
fix: Mix format. #256
Browse files Browse the repository at this point in the history
  • Loading branch information
LuchoTurtle committed Jan 12, 2023
1 parent 0abf8af commit 2edb2b7
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
18 changes: 9 additions & 9 deletions lib/app/item.ex
Original file line number Diff line number Diff line change
Expand Up @@ -74,19 +74,19 @@ defmodule App.Item do
|> Repo.preload(tags: from(t in Tag, order_by: t.text))
end

@doc """
`get_item/1` gets a single Item.
@doc """
`get_item/1` gets a single Item.
Returns nil if the Item does not exist
Returns nil if the Item does not exist
## Examples
## Examples
iex> get_item(1)
%Timer{}
iex> get_item(1)
%Timer{}
iex> get_item(1313)
nil
"""
iex> get_item(1313)
nil
"""
def get_item(id) do
Item
|> Repo.get(id)
Expand Down
1 change: 1 addition & 0 deletions lib/app_web/controllers/api/item_controller.ex
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ defmodule AppWeb.API.ItemController do
code: 404,
message: "No item found with the given \'id\'."
}

json(conn |> put_status(404), errors)

timer ->
Expand Down
1 change: 1 addition & 0 deletions lib/app_web/controllers/api/timer_controller.ex
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ defmodule AppWeb.API.TimerController do
code: 404,
message: "No timer found with the given \'id\'."
}

json(conn |> put_status(404), errors)

timer ->
Expand Down

0 comments on commit 2edb2b7

Please sign in to comment.