Skip to content

Commit

Permalink
feat(dob): calculate dob for user find proxy
Browse files Browse the repository at this point in the history
  • Loading branch information
akinsey committed Nov 7, 2024
1 parent 8af4e0a commit 94157d7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/epochtalk_server_web/json/user_json.ex
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,15 @@ defmodule EpochtalkServerWeb.Controllers.UserJSON do
_ -> nil
end

dob = case d = Map.get(user, :dob) do
~D[0001-01-01] -> nil
_ -> d
end

user
|> Map.put(:signature, parsed_signature)
|> Map.put(:gender, gender)
|> Map.put(:dob, dob)
end

@doc """
Expand Down

0 comments on commit 94157d7

Please sign in to comment.