Skip to main content

update_user_information_to_tmc

Function update_user_information_to_tmc 

Source
pub async fn update_user_information_to_tmc(
    upstream_id: Option<i32>,
    first_name: String,
    last_name: String,
    email: Option<String>,
    tmc_client: &TmcClient,
    app_conf: &ApplicationConfiguration,
) -> Result<(), ControllerError>
Expand description

Copies a changed name, and email when it changed too, to TMC, which keeps its own copy of both; a no-op for an account without a TMC upstream_id. Callers run it inside their transaction so a TMC failure rolls the change back.