headless_lms_models::library::content_management

Function create_new_chapter

Source
pub async fn create_new_chapter(
    conn: &mut PgConnection,
    pkey_policy: PKeyPolicy<(Uuid, Uuid)>,
    new_chapter: &NewChapter,
    user: Uuid,
    spec_fetcher: impl SpecFetcher,
    fetch_service_info: impl Fn(Url) -> BoxFuture<'static, ModelResult<ExerciseServiceInfoApi>>,
) -> ModelResult<(DatabaseChapter, Page)>
Expand description

Creates a new chapter with a front page.