Commit Graph

3 Commits

Author SHA1 Message Date
Ben Melchior
3b2f20433b Update README.md to provide comprehensive API documentation
- Added an overview of the Hospital API service and its purpose.
- Included detailed features of the API, such as automatic shift management and real-time information.
- Documented API endpoints with descriptions, response examples, and setup instructions.
- Provided configuration details and database schema information.
- Explained background tasks and logging format for better understanding of the application.
2025-04-12 21:53:51 +02:00
Ben Melchior
ba78627169 Enhance application configuration and functionality
- Updated `.env` file to include `DB_MAX_CONNECTIONS` and `ENVIRONMENT` variables.
- Modified `Cargo.toml` to add `thiserror` and `time` dependencies, and updated `sqlx` features.
- Refactored `main.rs` to implement periodic tasks for checking future shifts and printing the current hospital.
- Expanded routing in `routes.rs` to include a new endpoint for current hospital status.
- Improved database initialization in `init.rs` to conditionally drop tables based on the environment.
- Enhanced error handling in database operations and added logging for better traceability.
- Updated hospital management logic in `hospital.rs` to fetch and store shifts with improved timestamp logging.
2025-04-12 21:52:34 +02:00
Ben Melchior
19833ad384 first commit 2025-01-26 22:08:22 +01:00