Clean up unused code and compiler warnings
Removed unused functions and variables identified after RRULE parameter fix: - Remove unused build_series_rrule function from backend series handler - Remove unused RecurrenceType::from_rrule and helper functions from frontend - Prefix unused state variables with underscores to suppress warnings 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -460,34 +460,6 @@ pub async fn delete_event_series(
|
||||
|
||||
// Helper functions
|
||||
|
||||
fn build_series_rrule(request: &CreateEventSeriesRequest) -> Result<String, ApiError> {
|
||||
// Extract frequency from request
|
||||
let recurrence_freq = if request.recurrence.contains("FREQ=") {
|
||||
// Parse RRULE to extract frequency
|
||||
if request.recurrence.contains("FREQ=DAILY") {
|
||||
"daily"
|
||||
} else if request.recurrence.contains("FREQ=WEEKLY") {
|
||||
"weekly"
|
||||
} else if request.recurrence.contains("FREQ=MONTHLY") {
|
||||
"monthly"
|
||||
} else if request.recurrence.contains("FREQ=YEARLY") {
|
||||
"yearly"
|
||||
} else {
|
||||
return Err(ApiError::BadRequest("Invalid RRULE frequency".to_string()));
|
||||
}
|
||||
} else {
|
||||
let lower = request.recurrence.to_lowercase();
|
||||
match lower.as_str() {
|
||||
"daily" => "daily",
|
||||
"weekly" => "weekly",
|
||||
"monthly" => "monthly",
|
||||
"yearly" => "yearly",
|
||||
_ => return Err(ApiError::BadRequest("Invalid recurrence type".to_string())),
|
||||
}
|
||||
};
|
||||
|
||||
build_series_rrule_with_freq(request, recurrence_freq)
|
||||
}
|
||||
|
||||
fn build_series_rrule_with_freq(request: &CreateEventSeriesRequest, freq: &str) -> Result<String, ApiError> {
|
||||
let mut rrule_parts = Vec::new();
|
||||
|
||||
Reference in New Issue
Block a user