Skip to main content

replace_verified_student_number

Function replace_verified_student_number 

Source
pub async fn replace_verified_student_number(
    conn: &mut PgConnection,
    current_link_id: Option<Uuid>,
    new: &NewVerifiedStudentNumber,
    actor_user_id: Option<Uuid>,
    event_kind: CreditRegistrationEventKind,
    event_message: &str,
) -> ModelResult<(Uuid, i64)>
Expand description

Retires current_link_id (the account’s link the caller already resolved, if any), inserts new in its place, clears the mailed links to new’s number that are no longer owed, and audits the change on the account’s live registrations.

Returns the new link’s id and how many of the account’s registrations the change unblocked. actor_user_id is None when a worker made the link and no person decided it.