mirror of
https://github.com/sassanix/Warracker.git
synced 2026-01-04 12:39:50 -06:00
### Highlights: - **Environment Variable Precedence Fix:** Corrected config loading logic to prioritize environment variables over database defaults on fresh installations. Ensured OIDC, Apprise, and email settings are now correctly derived from `.env` files. Also fixed the `/api/auth/oidc-status` endpoint to reflect the true state. - **PostgreSQL Migration Permissions:** Updated migration scripts to avoid `CREATEROLE` errors on standard DB users by using `DO` blocks with graceful fallbacks. ### Major Code Refactoring: - **Blueprint Extraction:** - Moved admin, warranty, tag, file handling, and statistics routes into dedicated Flask Blueprints for improved maintainability. - Introduced `file_routes.py`, `tags_routes.py`, `admin_routes.py`, `warranties_routes.py`, and `statistics_routes.py`. - **Application Factory Pattern:** - Adopted the Flask Application Factory pattern using `create_app()` for modular, testable architecture. - Added `config.py`, centralized `extensions.py`, and simplified `app.py` to a minimal entry point. ### Additional Fixes: - Restored missing `/api/currencies` and `/api/settings/global-view-status` endpoints. - Fixed status page warranty expansion and toast notification issues. - Updated frontend logic to properly show Paperless-ngx documents on warranty cards and status page. ### Impact: - Configuration via Docker `.env` now works reliably. - Application can now run on standard PostgreSQL setups. - Codebase is modular and easier to maintain. - Frontend issues related to missing endpoints and document visibility are resolved.