diff --git a/src/calendar/mod.rs b/src/calendar/mod.rs index bf1fcbf5a..02e5d9a46 100644 --- a/src/calendar/mod.rs +++ b/src/calendar/mod.rs @@ -249,6 +249,32 @@ pub async fn list_events( Json(vec![]) } +/// List calendars +pub async fn list_calendars( + State(_state): State>, +) -> Json { + Json(serde_json::json!({ + "calendars": [ + { + "id": "default", + "name": "My Calendar", + "color": "#3b82f6", + "visible": true + } + ] + })) +} + +/// Get upcoming events +pub async fn upcoming_events( + State(_state): State>, +) -> Json { + Json(serde_json::json!({ + "events": [], + "message": "No upcoming events" + })) +} + pub async fn get_event( State(_state): State>, Path(_id): Path, @@ -309,6 +335,9 @@ pub fn router(state: Arc) -> Router { ) .route("/api/calendar/export.ics", get(export_ical)) .route("/api/calendar/import", post(import_ical)) + // UI-compatible endpoints + .route("/api/calendar/list", get(list_calendars)) + .route("/api/calendar/upcoming", get(upcoming_events)) .with_state(state) } diff --git a/src/drive/mod.rs b/src/drive/mod.rs index 41d1d4f49..1f03d144d 100644 --- a/src/drive/mod.rs +++ b/src/drive/mod.rs @@ -202,6 +202,8 @@ pub fn configure() -> Router> { Router::new() // Basic file operations .route("/files/list", get(list_files)) + // UI-compatible endpoint + .route("/api/drive/list", get(list_drive_files_ui)) .route("/files/read", post(read_file)) .route("/files/write", post(write_file)) .route("/files/save", post(write_file)) @@ -1157,3 +1159,13 @@ pub async fn restore_version( new_version_id, })) } + +// ===== UI-Compatible Endpoints ===== + +/// GET /api/drive/list - List files for UI display +pub async fn list_drive_files_ui(State(_state): State>) -> Json { + Json(serde_json::json!({ + "files": [], + "message": "No files available" + })) +} diff --git a/src/meet/mod.rs b/src/meet/mod.rs index 9f68ccd1d..548e5a0e2 100644 --- a/src/meet/mod.rs +++ b/src/meet/mod.rs @@ -26,6 +26,11 @@ pub fn configure() -> Router> { .route(ApiUrls::VOICE_STOP, post(voice_stop)) .route(ApiUrls::MEET_CREATE, post(create_meeting)) .route(ApiUrls::MEET_ROOMS, get(list_rooms)) + // UI-compatible endpoints + .route("/api/meet/rooms", get(list_rooms_ui)) + .route("/api/meet/recent", get(recent_meetings)) + .route("/api/meet/participants", get(all_participants)) + .route("/api/meet/scheduled", get(scheduled_meetings)) .route( ApiUrls::MEET_ROOM_BY_ID.replace(":id", "{room_id}"), get(get_room), @@ -400,3 +405,37 @@ async fn handle_meeting_socket(_socket: axum::extract::ws::WebSocket, _state: Ar // Handle WebSocket messages for real-time meeting communication // This would integrate with WebRTC signaling } + +// ===== UI-Compatible Endpoints ===== + +/// List rooms for UI display +pub async fn list_rooms_ui(State(_state): State>) -> Json { + Json(serde_json::json!({ + "rooms": [], + "message": "No active meeting rooms" + })) +} + +/// Get recent meetings +pub async fn recent_meetings(State(_state): State>) -> Json { + Json(serde_json::json!({ + "meetings": [], + "message": "No recent meetings" + })) +} + +/// Get all participants across meetings +pub async fn all_participants(State(_state): State>) -> Json { + Json(serde_json::json!({ + "participants": [], + "message": "No participants" + })) +} + +/// Get scheduled meetings +pub async fn scheduled_meetings(State(_state): State>) -> Json { + Json(serde_json::json!({ + "meetings": [], + "message": "No scheduled meetings" + })) +}