fix: use proper function head for default values with multiple clauses
This commit is contained in:
parent
139eb3b147
commit
442a79baa7
1 changed files with 2 additions and 1 deletions
|
|
@ -108,9 +108,10 @@ defmodule ToweropsWeb.AgentLive.Helpers do
|
|||
|
||||
Returns strings like "5m ago (Jan 15, 2026 at 2:34 PM EST)".
|
||||
"""
|
||||
def format_last_seen_with_date(datetime, timezone \\ "UTC")
|
||||
def format_last_seen_with_date(nil, _timezone), do: "Never"
|
||||
|
||||
def format_last_seen_with_date(datetime, timezone \\ "UTC") do
|
||||
def format_last_seen_with_date(datetime, timezone) do
|
||||
relative = format_last_seen(datetime)
|
||||
full = format_datetime(datetime, timezone)
|
||||
"#{relative} (#{full})"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue