Function update_user_meta

Source
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 query
  • user_id - Unique identifier of the user
  • timezone - Optional new timezone preference
  • language - Optional new language preference
  • theme - Optional new theme preference
  • onboarding_completed - Optional flag indicating if onboarding is completed

§Returns

  • Ok(()) - Successfully updated user metadata
  • Err(anyhow::Error) - Failed to update user metadata