diff --git a/apps/sspanel/urls.py b/apps/sspanel/urls.py index a55418e1a1..7d54b6ed74 100644 --- a/apps/sspanel/urls.py +++ b/apps/sspanel/urls.py @@ -12,7 +12,9 @@ # 注册/登录 path("register/", views.RegisterView.as_view(), name="register"), path("login/", views.UserLogInView.as_view(), name="login"), - path("login/telegram/", views.TelegramLoginView.as_view(), name="telegram_login"), + path( + "login-with-telegram/", views.TelegramLoginView.as_view(), name="telegram_login" + ), path("logout/", views.UserLogOutView.as_view(), name="logout"), path( "user_traffic_log/", views.UserTrafficLogView.as_view(), name="user_traffic_log" diff --git a/apps/urls.py b/apps/urls.py index 743a90e334..99aa38a7f2 100644 --- a/apps/urls.py +++ b/apps/urls.py @@ -34,7 +34,6 @@ path("prom/", include("django_prometheus.urls")), ) - # append openapi urls urlpatterns.append( path("openapi/v1/", include(openapi_router.urls)), diff --git a/configs/default/sites.py b/configs/default/sites.py index 910e1efed6..c36f7c3dd0 100644 --- a/configs/default/sites.py +++ b/configs/default/sites.py @@ -91,4 +91,4 @@ # TG 相关配置 TELEGRAM_BOT_NAME = os.getenv("TELEGRAM_BOT_NAME") TELEGRAM_BOT_TOKEN = os.getenv("TELEGRAM_BOT_TOKEN") -TELEGRAM_LOGIN_REDIRECT_URL = f"{SITE_HOST}/login/telegram/" +TELEGRAM_LOGIN_REDIRECT_URL = f"{SITE_HOST}/login-with-telegram/"