feat: add user profile management with update and retrieval endpoints, enhance database setup for testing

This commit is contained in:
2025-09-06 14:24:27 +02:00
parent 6e63dca513
commit c9e99e6f23
21 changed files with 422 additions and 42 deletions

View File

@@ -9,3 +9,26 @@ pub struct CreateUserParams {
#[validate(length(min = 6))]
pub password: String,
}
#[derive(Deserialize, Validate, ToSchema, Default)]
pub struct UpdateUserParams {
#[validate(length(max = 50))]
#[schema(example = "Frutiger Aero Fan")]
pub display_name: Option<String>,
#[validate(length(max = 160))]
#[schema(example = "Est. 2004")]
pub bio: Option<String>,
#[validate(url)]
pub avatar_url: Option<String>,
#[validate(url)]
pub header_url: Option<String>,
pub custom_css: Option<String>,
#[validate(length(max = 8))]
#[schema(example = json!(["username1", "username2"]))]
pub top_friends: Option<Vec<String>>,
}