Adding the user to the session

This commit is contained in:
2023-02-18 16:39:17 +00:00
parent e3a9f2f77e
commit 47c92ad44a
4 changed files with 32 additions and 2 deletions

View File

@@ -16,10 +16,12 @@ defmodule PhoenixApiTemplateWeb.Router do
pipeline :api do
plug(:accepts, ["json"])
plug :fetch_session
end
pipeline :auth do
plug PhoenixApiTemplateWeb.Auth.Pipeline
plug PhoenixApiTemplateWeb.Auth.SetUser
end
scope "/api", PhoenixApiTemplateWeb do