-
Notifications
You must be signed in to change notification settings - Fork 0
Fix API endpoints: Add GET /api/database/jobs/{job_id} and fix analytics dashboard authentication #36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…_optional_current_user for /api/analytics and /analytics routes to allow public access to analytics data without requiring user login
…ation in DOMContentLoaded event listener to ensure DOM is fully loaded before executing JS, preventing stats from not displaying
…ager_fixed.js instead of database_manager.js to apply the DOM loading fix for stats display
…bManager globally and revert analytics to require authentication for security
…ics dashboard authentication - Add get_job_by_id method to JobSearchStorage class - Add GET /api/database/jobs/{job_id} endpoint to retrieve individual jobs - Change analytics dashboard authentication from required to optional - Fix 405 Method Not Allowed error for job retrieval by ID - Fix 403 Forbidden error for analytics dashboard access
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
PR Code Suggestions ✨Explore these optional code suggestions:
|
User description
This PR fixes two API endpoint issues identified in the application logs:
Changes Made
1. Added GET /api/database/jobs/{job_id} endpoint
2. Fixed analytics dashboard authentication
Testing
Related Issues
PR Type
Bug fix, Enhancement
Description
Add GET endpoint for retrieving individual jobs by ID (
/api/database/jobs/{job_id}
)Fix analytics dashboard authentication to allow optional user access
Implement DOM loading fix for database manager JavaScript initialization
Add auto-open job URL feature when viewing job details
Diagram Walkthrough
File Walkthrough
job_search_storage.py
Add job retrieval method to storage class
job_search_storage.py
get_job_by_id()
method to retrieve specific job by IDformats
stackscout_web.py
Add job endpoint and fix analytics authentication
stackscout_web.py
/api/database/jobs/{job_id}
endpoint for individual jobretrieval
database_manager_fixed.js
Fix DOM loading and add job URL auto-open
static/js/database_manager_fixed.js
DatabaseManager
initialization inDOMContentLoaded
event listenerdbManager
globally to maintain event handler functionalitydatabase_manager_enhanced.html
Update template to use fixed JavaScript file
templates/database_manager_enhanced.html
database_manager_fixed.js
instead ofdatabase_manager.js