feat(meetings): add rename_meeting command
Validates a non-empty trimmed title before delegating to the store.
This commit is contained in:
@@ -2036,6 +2036,25 @@ pub async fn attach_meeting_to_event(
|
||||
.map_err(|e| WaError::new("storage", e.to_string()))
|
||||
}
|
||||
|
||||
/// Manually rename a meeting — recordings default to "Untitled meeting" with
|
||||
/// no prior way to change that from the UI.
|
||||
#[tauri::command]
|
||||
pub async fn rename_meeting(
|
||||
state: State<'_, AppState>,
|
||||
meeting_id: MeetingId,
|
||||
title: String,
|
||||
) -> WaResult<()> {
|
||||
let title = title.trim();
|
||||
if title.is_empty() {
|
||||
return Err(WaError::new("storage", "title cannot be empty"));
|
||||
}
|
||||
state
|
||||
.store
|
||||
.rename_meeting(&meeting_id, title)
|
||||
.await
|
||||
.map_err(|e| WaError::new("storage", e.to_string()))
|
||||
}
|
||||
|
||||
// ---- Sync / upload (Phase 9, ADR-0010) ----
|
||||
|
||||
/// Config payload for add/update (snake_case, matching the TS `SyncTargetConfig`
|
||||
@@ -2382,13 +2401,21 @@ pub async fn test_sync_target(
|
||||
(row.credential_ref.clone(), None)
|
||||
};
|
||||
let target = crate::sync::WebDavTarget {
|
||||
base_url: config.base_url.clone().or(row.base_url.clone()).unwrap_or_default(),
|
||||
base_url: config
|
||||
.base_url
|
||||
.clone()
|
||||
.or(row.base_url.clone())
|
||||
.unwrap_or_default(),
|
||||
provider_hint: config.provider_hint.clone().or(row.provider_hint.clone()),
|
||||
remote_base_path: config
|
||||
.remote_base_path
|
||||
.clone()
|
||||
.unwrap_or(row.remote_base_path.clone()),
|
||||
username: config.username.clone().or(row.username.clone()).unwrap_or_default(),
|
||||
username: config
|
||||
.username
|
||||
.clone()
|
||||
.or(row.username.clone())
|
||||
.unwrap_or_default(),
|
||||
credential_ref,
|
||||
third_party: false,
|
||||
allow_plaintext_lan: config
|
||||
|
||||
Reference in New Issue
Block a user