fix: change credentials endpoint from /api/users to /api/admin

This commit is contained in:
stellarshenson
2026-01-06 21:00:21 +01:00
parent 63633420dd
commit 6f85208352
3 changed files with 3 additions and 3 deletions

View File

@@ -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),
]

View File

@@ -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": "..."}, ...]}
"""

View File

@@ -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',