This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule ExternalAPIRouter do | |
use Phoenix.Router | |
import Plug.Conn | |
import Phoenix.Controller | |
scope "/api/v1" do | |
get("me2", __MODULE__, :me) | |
get("product/:product_id", __MODULE__, :product_detail) | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule ExternalUser do | |
use Ecto.Schema | |
import Ecto.Changeset | |
@primary_key false | |
embedded_schema do | |
field(:first_name, :string) | |
field(:last_name, :string) | |
end |
OlderNewer