Refactor handlers.rs into modular structure for better maintainability
- Split 1921-line handlers.rs into focused modules: - handlers/auth.rs: Authentication handlers (login, verify_token, get_user_info) - handlers/calendar.rs: Calendar management (create_calendar, delete_calendar) - handlers/events.rs: Event operations (CRUD operations, fetch events) - handlers/series.rs: Event series operations (recurring events management) - Main handlers.rs now serves as clean re-export module - All tests passing (14 integration + 7 unit + 3 doc tests) - Maintains backward compatibility with existing API routes - Improves code organization and separation of concerns 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -104,7 +104,7 @@ impl AuthService {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn generate_token(&self, username: &str, server_url: &str) -> Result<String, ApiError> {
|
||||
pub fn generate_token(&self, username: &str, server_url: &str) -> Result<String, ApiError> {
|
||||
let now = Utc::now();
|
||||
let expires_at = now + Duration::hours(24); // Token valid for 24 hours
|
||||
|
||||
|
||||
Reference in New Issue
Block a user