419 B · text History bfa2c00
defmodule DiogramosWeb.Api.V1.UserController do
  @moduledoc """
  The identity endpoint. Doubles as the token probe the Android pair
  screen uses to validate a scanned QR before storing it.
  """
  use DiogramosWeb, :controller

  def me(conn, _params) do
    user = conn.assigns.current_scope.user

    json(conn, %{
      id: user.id,
      email: user.email,
      confirmed_at: user.confirmed_at
    })
  end
end