Skip to main content

seed_tutorials_if_first_call

Function seed_tutorials_if_first_call 

Source
pub async fn seed_tutorials_if_first_call(
    db: &(dyn NotebookDb + 'static),
    user_id: Uuid,
) -> Result<(), DatabaseError>
Expand description

Seed the two tutorial notebooks for user_id if not already present.

Idempotent: if both tutorial ids already exist for this owner, this is a no-op. If either is missing it is inserted with the deterministic UUID5 id and deletable=false.