pub async fn update_user_meta(
pool: &Pool<MySql>,
user_id: i64,
timezone: Option<&str>,
language: Option<&str>,
theme: Option<&str>,
onboarding_completed: Option<bool>,
) -> Result<()>Expand description
Updates a user’s preferences and metadata.
This function updates the user’s preferences in the user_meta table.
§Arguments
pool- Database connection pool for executing the queryuser_id- Unique identifier of the usertimezone- Optional new timezone preferencelanguage- Optional new language preferencetheme- Optional new theme preferenceonboarding_completed- Optional flag indicating if onboarding is completed
§Returns
Ok(())- Successfully updated user metadataErr(anyhow::Error)- Failed to update user metadata