feat: expose display_name, also_known_as, profile fields in GET /profile

This commit is contained in:
2026-06-04 02:58:12 +02:00
parent cf2f4a1b4f
commit 15dc0e526b
3 changed files with 33 additions and 0 deletions

View File

@@ -414,9 +414,19 @@ pub async fn get_profile(
.await?;
Ok(Json(ProfileResponse {
username: profile.username,
display_name: profile.display_name,
bio: profile.bio,
avatar_url: profile.avatar_url,
banner_url: profile.banner_url,
also_known_as: profile.also_known_as,
fields: profile
.fields
.into_iter()
.map(|f| api_types::ProfileFieldDto {
name: f.name,
value: f.value,
})
.collect(),
role: profile.role,
}))
}