- Check if user is logged in and admin, OR if using valid API key
- This allows API access with Bearer token authentication
- Fixes 'Acesso negado' error for API key requests
- Remove redundant requireAuth call since apiOrAuth middleware handles authentication
- This was causing 'Authentication required' error even with valid API key
- Change all user API routes to use apiOrAuth middleware
- This allows API access with Bearer token authentication
- Fixes 302 redirects for API endpoints
- Create migration AddLastLoginToUsers to add last_login column
- Revert UserModel to use last_login column in queries
- Proper solution: add missing column instead of removing from code
- Fix getAllForAdmin method to not select last_login column
- Fix findForAdmin method to not select last_login column
- Users table doesn't have last_login column
- Fix storage permissions to use 'www' user instead of 'www-data'
- Fix UserModel getAllForAdmin query to avoid placeholders in LIMIT/OFFSET
- Update deploy script to use correct user permissions
- Clean up test files
- Fix storage permissions to use 'www' user instead of 'www-data'
- Fix UserModel getAllForAdmin query to avoid placeholders in LIMIT/OFFSET
- Import missing modules: Advertising, Dashboard, Analytics
- Update deploy script to copy files to public directory
- Copy complete Users module from CRM_Project
- Fix syntax error in UserController.php (trailing whitespace)
- Add admin users management functionality
- Include user profiles, roles, and permissions
- Add API endpoints for user management
- Add complete redirectsList() function with API integration
- Include analytics_slug support in JavaScript
- Fix missing function that was causing page to not load
- Add proper error handling and loading states
- Add conditional check to show warning if analytics_slug is missing
- Improve error handling for missing analytics data
- Add visual feedback for debugging
- Add analytics public URL input with copy button in redirect view
- Fix deleteCreativeByRedirectId to handle missing creatives gracefully
- Add copyAnalyticsUrl JavaScript function with visual feedback
- Improve error handling in redirect deletion process
- Add analytics_slug column to redirects table
- Generate unique analytics slugs using CUID2
- Update PublicCampaignsController to use analytics_slug
- Update views to use analytics_slug in analytics links
- Add migration and population scripts
- Improve security by separating public redirect and analytics URLs
- Add PublicCampaignsController for public campaign analytics
- Add public routes for /public/analytics/{slug} and /api/campaigns/{slug}
- Add public campaign analytics view with charts and KPIs
- Support for campaign sharing via custom slugs
- Real-time analytics with ApexCharts integration