diff --git a/src/interfaces/api/handlers/favorites_handler.rs b/src/interfaces/api/handlers/favorites_handler.rs index a1ee2703..bd4da7ba 100644 --- a/src/interfaces/api/handlers/favorites_handler.rs +++ b/src/interfaces/api/handlers/favorites_handler.rs @@ -6,7 +6,7 @@ use axum::{ }; use serde::Deserialize; use std::sync::Arc; -use tracing::{error, info}; +use tracing::{error, info, warn}; use utoipa::ToSchema; use crate::application::dtos::display_helpers::{ @@ -56,6 +56,7 @@ pub async fn get_favorites( auth_user: AuthUser, ) -> impl IntoResponse { let user_id = auth_user.id; + warn!("Deprecated endpoint called: GET /api/favorites — use GET /api/favorites/resources instead"); match favorites_service.get_favorites(user_id).await { Ok(favorites) => { diff --git a/src/interfaces/api/handlers/folder_handler.rs b/src/interfaces/api/handlers/folder_handler.rs index 8c8b19c5..e8aea4ca 100644 --- a/src/interfaces/api/handlers/folder_handler.rs +++ b/src/interfaces/api/handlers/folder_handler.rs @@ -490,6 +490,7 @@ pub async fn list_folder_contents( auth_user: AuthUser, path: Path, ) -> axum::response::Response { + tracing::warn!("Deprecated endpoint called: GET /api/folders/{{id}}/contents — use GET /api/folders/{{id}}/resources?resource_types=folder instead"); FolderHandler::list_folder_contents_impl(state, auth_user, path).await } @@ -533,6 +534,7 @@ pub async fn list_folder_contents_paginated( path: Path, pagination: Query, ) -> axum::response::Response { + tracing::warn!("Deprecated endpoint called: GET /api/folders/{{id}}/contents/paginated — use GET /api/folders/{{id}}/resources instead"); FolderHandler::list_folder_contents_paginated_impl(state, auth_user, path, pagination).await } diff --git a/src/interfaces/api/handlers/recent_handler.rs b/src/interfaces/api/handlers/recent_handler.rs index 5ce50631..fe6d978a 100644 --- a/src/interfaces/api/handlers/recent_handler.rs +++ b/src/interfaces/api/handlers/recent_handler.rs @@ -6,7 +6,7 @@ use axum::{ }; use serde::Deserialize; use std::sync::Arc; -use tracing::{error, info}; +use tracing::{error, info, warn}; use crate::application::dtos::display_helpers::{ category_for, format_file_size, icon_class_for, icon_special_class_for, @@ -47,6 +47,7 @@ pub async fn get_recent_items( Query(params): Query, ) -> impl IntoResponse { let user_id = auth_user.id; + warn!("Deprecated endpoint called: GET /api/recent — use GET /api/recent/resources instead"); match recent_service.get_recent_items(user_id, params.limit).await { Ok(items) => { diff --git a/src/interfaces/api/routes.rs b/src/interfaces/api/routes.rs index da26f78d..17ae3e82 100644 --- a/src/interfaces/api/routes.rs +++ b/src/interfaces/api/routes.rs @@ -338,8 +338,8 @@ pub fn create_api_routes(app_state: &Arc) -> Router> { }; Router::new() - .route("/", get(get_favorites)) // deprecated, kept for compat - .route("/resources", get(list_favorites_resources)) // new cursor-paginated endpoint + .route("/", get(get_favorites)) // deprecated — kept for external compat + .route("/resources", get(list_favorites_resources)) .route("/batch", post(favorites_handler::batch_add_favorites)) .route( "/{item_type}/{item_id}", @@ -360,7 +360,7 @@ pub fn create_api_routes(app_state: &Arc) -> Router> { use crate::interfaces::api::handlers::recent_handler; Router::new() - .route("/", get(recent_handler::get_recent_items)) + .route("/", get(recent_handler::get_recent_items)) // deprecated — kept for external compat .route("/resources", get(recent_handler::list_recent_resources)) .route( "/{item_type}/{item_id}",