ExShopifyApp.Plug (ex_shopify_app v0.1.1)
Summary
Functions
Fetches the authenticated shop from the connection.
Like authenticated_shop/1 but raises an error if no authenticated shop is set.
Functions
@spec authenticated_shop(Plug.Conn.t()) :: map() | nil
Fetches the authenticated shop from the connection.
Example
iex> conn = %Plug.Conn{private: %{authenticated_shop: %{id: 1}}} iex> authenticated_shop(conn) %{id: 1}
iex> authenticated_shop(%Plug.Conn{private: %{}}) nil
@spec authenticated_shop!(Plug.Conn.t()) :: map()
Like authenticated_shop/1 but raises an error if no authenticated shop is set.