chore(deprecated api): log a warning on serverside if a deprecated route is still used

This commit is contained in:
Edouard Vanbelle
2026-05-29 12:54:09 +02:00
parent d88b3a313f
commit 6e30353c4b
4 changed files with 9 additions and 5 deletions
+3 -3
View File
@@ -338,8 +338,8 @@ pub fn create_api_routes(app_state: &Arc<AppState>) -> Router<Arc<AppState>> {
};
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<AppState>) -> Router<Arc<AppState>> {
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}",