Skip to content

Commit 3aa6e80

Browse files
committed
feat: /admin/crawl
1 parent 99ab2cf commit 3aa6e80

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

lib/algora_web/router.ex

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,18 @@ defmodule AlgoraWeb.Router do
6767
oban_dashboard("/oban", resolver: AlgoraWeb.ObanDashboardResolver)
6868
end
6969

70+
scope "/admin", AlgoraCloud do
71+
pipe_through [:browser]
72+
73+
live_session :admin_cloud,
74+
layout: {AlgoraWeb.Layouts, :user},
75+
on_mount: [{AlgoraWeb.UserAuth, :ensure_admin}, AlgoraWeb.Admin.Nav] do
76+
if Code.ensure_loaded?(AlgoraCloud.CrawlLive) do
77+
live "/crawl", CrawlLive
78+
end
79+
end
80+
end
81+
7082
scope "/", AlgoraWeb do
7183
pipe_through [:browser]
7284

0 commit comments

Comments
 (0)