feat: include avatar_url and banner_url in UserProfileResponse

This commit is contained in:
2026-06-04 02:37:16 +02:00
parent c4908b7765
commit 837b7866af
2 changed files with 6 additions and 0 deletions

View File

@@ -66,6 +66,10 @@ pub struct UserTrendsDto {
pub struct UserProfileResponse {
pub user_id: Uuid,
pub username: String,
#[serde(skip_serializing_if = "Option::is_none")]
pub avatar_url: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub banner_url: Option<String>,
pub stats: UserStatsDto,
pub following_count: usize,
pub followers_count: usize,

View File

@@ -1120,6 +1120,8 @@ pub async fn get_user_profile(
Json(UserProfileResponse {
user_id,
username: user.username().value().to_string(),
avatar_url: user.avatar_path().map(|s| s.to_string()),
banner_url: user.banner_path().map(|s| s.to_string()),
stats: UserStatsDto {
total_movies: profile.stats.total_movies,
avg_rating: profile.stats.avg_rating,