Skip to main content

update_course

Function update_course 

Source
pub async fn update_course(
    conn: &mut PgConnection,
    app_config: &ApplicationConfiguration,
    course_id: Uuid,
    course_update: CourseUpdate,
    author_user_id: Uuid,
    can_change_chatbot: bool,
) -> ModelResult<Course>
Expand description

Saves the course’s editable fields and records the result in its history. Errors with PreconditionFailed if the update changes can_add_chatbot and can_change_chatbot is false.