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
@@ -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) => {