Skip to content

Commit

Permalink
[temp] shift all from anon session to sangh sess
Browse files Browse the repository at this point in the history
  • Loading branch information
rtshkmr committed Aug 15, 2024
1 parent 9754b10 commit d010644
Showing 1 changed file with 15 additions and 19 deletions.
34 changes: 15 additions & 19 deletions lib/vyasa_web/router.ex
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
defmodule VyasaWeb.Router do
use VyasaWeb, :router


pipeline :browser do
plug :accepts, ["html"]
plug CORSPlug, origin: ["https://www.youtube.com/iframe_api"]
Expand All @@ -16,37 +15,35 @@ defmodule VyasaWeb.Router do
plug :accepts, ["json"]
end



scope "/", VyasaWeb do
pipe_through :browser


get "/og/:filename", OgImageController, :show


get "/", PageController, :home

live_session :gen_anon_session,
on_mount: [{VyasaWeb.Session, :anon}] do
# live_session :gen_anon_session,
# on_mount: [{VyasaWeb.Session, :anon}] do
# live "/explore/", SourceLive.Index, :index
# live "/explore/:source_title/", SourceLive.Show, :show
# # live "/explore/:source_title/:chap_no", SourceLive.Chapter.Index, :index
# live "/explore/:source_title/:chap_no", SourceLive.Chapter.Index, :index
# live "/explore/:source_title/:chap_no/:verse_no", SourceLive.Chapter.ShowVerse, :show
# end

live_session :gen_sangh_session,
on_mount: [{VyasaWeb.Session, :sangh}] do
live "/explore/", SourceLive.Index, :index
live "/explore/:source_title/", SourceLive.Show, :show
#live "/explore/:source_title/:chap_no", SourceLive.Chapter.Index, :index
#live "/explore/:source_title/:chap_no", SourceLive.Chapter.Index, :index
live "/explore/:source_title/:chap_no", SourceLive.Chapter.Index, :index
live "/explore/:source_title/:chap_no/:verse_no", SourceLive.Chapter.ShowVerse, :show
end

live_session :gen_sangh_session,
on_mount: [{VyasaWeb.Session, :sangh}] do
live "/explore/:source_title/:chap_no", SourceLive.Chapter.Index, :index
end

live_admin "/admin" do
admin_resource "/verses", VyasaWeb.Admin.Written.Verse
admin_resource "/events", VyasaWeb.Admin.Medium.Event
admin_resource("/verses", VyasaWeb.Admin.Written.Verse)
admin_resource("/events", VyasaWeb.Admin.Medium.Event)
end

end
end

# Other scopes may use custom stacks.
# scope "/api", VyasaWeb do
Expand All @@ -65,7 +62,6 @@ defmodule VyasaWeb.Router do
scope "/dev" do
pipe_through :browser


live_dashboard "/dashboard", metrics: VyasaWeb.Telemetry
forward "/mailbox", Plug.Swoosh.MailboxPreview
end
Expand Down

0 comments on commit d010644

Please sign in to comment.