Clean up obsolete CalDAV environment variables
Some checks failed
Build and Push Docker Image / docker (push) Failing after 2s
Some checks failed
Build and Push Docker Image / docker (push) Failing after 2s
## Removed Obsolete Environment Variables: - `CALDAV_SERVER_URL` - provided by user login - `CALDAV_USERNAME` - provided by user login - `CALDAV_PASSWORD` - provided by user login - `CALDAV_TASKS_PATH` - not used in any features ## Kept with Intelligent Discovery: - `CALDAV_CALENDAR_PATH` - optional override, defaults to smart discovery ## Changes: ### Backend - Remove `CalDAVConfig::from_env()` method (not used in main app) - Add `CalDAVConfig::new()` constructor with credentials - Remove `tasks_path` field from CalDAVConfig - Update auth service to use new constructor - Update tests to use hardcoded test values instead of env vars - Update debug tools to use test credentials ### Frontend - Remove unused `config.rs` file entirely (frontend uses backend API) ## Current Authentication Flow: 1. User provides CalDAV credentials via login API 2. Backend creates CalDAVConfig dynamically from login request 3. Backend tests authentication via calendar discovery 4. Optional `CALDAV_CALENDAR_PATH` env var can override discovery 5. No environment variables required for normal operation This simplifies deployment - users only need to provide CalDAV credentials through the web interface, no server-side configuration required. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -52,13 +52,11 @@ pub async fn login(
|
||||
println!("📝 Created CalDAV config");
|
||||
|
||||
// First verify the credentials are valid by attempting to discover calendars
|
||||
let config = CalDAVConfig {
|
||||
server_url: request.server_url.clone(),
|
||||
username: request.username.clone(),
|
||||
password: request.password.clone(),
|
||||
calendar_path: None,
|
||||
tasks_path: None,
|
||||
};
|
||||
let config = CalDAVConfig::new(
|
||||
request.server_url.clone(),
|
||||
request.username.clone(),
|
||||
request.password.clone()
|
||||
);
|
||||
let client = CalDAVClient::new(config);
|
||||
client.discover_calendars()
|
||||
.await
|
||||
|
||||
Reference in New Issue
Block a user