Commit 8654d244 authored by Frank Kumro's avatar Frank Kumro

Merge branch 'quick_add_last_updated_at' into 'master'

Add inserted at information to page.

See merge request !6
parents f9242a21 86f90694
Pipeline #24031837 passed with stage
in 2 minutes and 8 seconds
......@@ -5,7 +5,7 @@ defmodule ThunderSnowWeb.PageController do
weather_report =
case ThunderSnow.Weather.get_latest_report() do
report when is_map(report) -> report
nil -> %{wind_speed: "NA", temperature: "NA"}
nil -> %{wind_speed: "NA", temperature: "NA", inserted_at: "NA"}
end
render(conn, "index.html", weather_report: weather_report)
......
......@@ -11,4 +11,5 @@
<h1 class="card-title display-1 text-center"><%= @weather_report.temperature %> ℉</h1>
</div>
</div>
</div>
\ No newline at end of file
</div>
<div class="inserted_at">Last updated at: <%= @weather_report.inserted_at %></div>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment