@@ -15,7 +15,7 @@ defmodule ShopifyAppWeb.Router do
1515 end
1616
1717 pipeline :shop_admin do
18- plug ShopifyAPI.Plugs.AdminAuthenticator , shopify_router_mount : "/shop "
18+ plug ShopifyAPI.Plugs.AdminAuthenticator , app_name : "shopify_app "
1919 plug ShopifyAPI.Plugs.PutShopifyContentHeaders
2020 end
2121
@@ -42,14 +42,17 @@ defmodule ShopifyAppWeb.Router do
4242 end
4343 end
4444
45- live_session :shop_admin ,
45+ live_session :live_shop_admin ,
4646 layout: { ShopifyAppWeb.ShopAdminLive.Layouts , :app } ,
47- root_layout: { ShopifyAppWeb.ShopAdminLive.Layouts , :root } do
48- scope "/shop_admin/:app" , ShopifyAppWeb do
47+ root_layout: { ShopifyAppWeb.ShopAdminLive.Layouts , :root } ,
48+ on_mount: [ ShopifyAppWeb.ShopAdminLive.AssignScope ] ,
49+ session: { ShopifyAppWeb.ShopAdminLive.AssignScope , :build_session , [ ] } do
50+ scope "/live_shop_admin" , ShopifyAppWeb do
4951 pipe_through :browser
5052 pipe_through :shop_admin
5153
5254 live "/" , ShopAdminLive.Index , :live
55+ live "/show" , ShopAdminLive.Index , :show
5356 live "/settings" , ShopAdminLive.Settings , :settings
5457 live "/more" , ShopAdminLive.Settings , :more_settings
5558 end
0 commit comments