asteroid/static/js
glenneth 4b8a3a064c feat: Implement role-based page flow and user management APIs
Core Features:
- Login redirects based on user role (admin -> /admin, users -> /profile)
- User registration redirects to /profile page
- Convert user management APIs to use define-api (Radiance standard)
- Add user statistics API endpoint
- Add create user API endpoint
- Add list users API endpoint

Authentication & Authorization:
- Update require-role to return proper JSON for API requests
- Fix password verification with debug logging
- Add reset-user-password function for admin use

API Endpoints (using define-api):
- /api/asteroid/users - Get all users (admin only)
- /api/asteroid/user-stats - Get user statistics (admin only)
- /api/asteroid/users/create - Create new user (admin only)

Bug Fixes:
- Fix JavaScript API path for user-stats endpoint
- Remove dependency on non-existent radiance:api-output
- Use api-output for proper JSON responses

Testing:
- Admin login redirects to /asteroid/admin ✓
- Regular user login redirects to /asteroid/profile ✓
- User creation working (testuser created successfully) ✓
- User statistics loading correctly ✓

Known Issues (non-blocking):
- User table display needs UI fixes
- Profile page needs additional API endpoints
- Session persistence on navigation needs investigation
2025-10-12 09:47:38 -04:00
..
admin.js Refactor API endpoints to use Radiance's define-api macro 2025-10-08 22:56:54 -04:00
auth-ui.js Refactor API endpoints to use Radiance's define-api macro 2025-10-08 22:56:54 -04:00
front-page.js Fix frontend JavaScript to work with define-api endpoints 2025-10-08 22:56:54 -04:00
player.js Fix frontend JavaScript to work with define-api endpoints 2025-10-08 22:56:54 -04:00
profile.js Fix frontend JavaScript to work with define-api endpoints 2025-10-08 22:56:54 -04:00
users.js feat: Implement role-based page flow and user management APIs 2025-10-12 09:47:38 -04:00