Packages

This is a CMS written in Elixir. Aims to be the great open-source ecommerce and/or startup solution for those who are searching for a performance and stability on top of modern technologies like React and Elixir.

Current section

Files

Jump to
lyn web controllers authorization_controller.ex
Raw

web/controllers/authorization_controller.ex

defmodule Lyn.AuthorizationController do
use Lyn.Web, :controller
use Guardian.Phoenix.Controller
alias Lyn.Repo
alias Lyn.Authorization
def index(conn, params, current_user, _claims) do
render conn, "index.html", current_user: current_user, authorizations: authorizations(current_user)
end
defp authorizations(user) do
Ecto.Model.assoc(user, :authorizations) |> Repo.all
end
end