diff --git a/config/jupyterhub_config.py b/config/jupyterhub_config.py index 5c865c1..2886d45 100644 --- a/config/jupyterhub_config.py +++ b/config/jupyterhub_config.py @@ -367,7 +367,7 @@ if c is not None: (r'/api/users/([^/]+)/manage-volumes', ManageVolumesHandler), (r'/api/users/([^/]+)/restart-server', RestartServerHandler), (r'/api/notifications/broadcast', BroadcastNotificationHandler), - (r'/api/users/credentials', GetUserCredentialsHandler), + (r'/api/admin/credentials', GetUserCredentialsHandler), (r'/notifications', NotificationsPageHandler), ] diff --git a/services/jupyterhub/conf/bin/custom_handlers.py b/services/jupyterhub/conf/bin/custom_handlers.py index 6ba7263..5bf1c63 100755 --- a/services/jupyterhub/conf/bin/custom_handlers.py +++ b/services/jupyterhub/conf/bin/custom_handlers.py @@ -477,7 +477,7 @@ class GetUserCredentialsHandler(BaseHandler): """ Retrieve cached credentials for newly created users (admin only) - POST /hub/api/users/credentials + POST /hub/api/admin/credentials Body: {"usernames": ["user1", "user2", ...]} Returns: {"credentials": [{"username": "...", "password": "..."}, ...]} """ diff --git a/services/jupyterhub/templates_enhanced/admin.html b/services/jupyterhub/templates_enhanced/admin.html index 31cfbaa..e0dd81b 100644 --- a/services/jupyterhub/templates_enhanced/admin.html +++ b/services/jupyterhub/templates_enhanced/admin.html @@ -150,7 +150,7 @@ console.log('[Admin] Fetching credentials for:', usernames); try { - const response = await originalFetch(`${baseUrl}api/users/credentials`, { + const response = await originalFetch(`${baseUrl}api/admin/credentials`, { method: 'POST', headers: { 'Content-Type': 'application/json',