pub struct Create;
Expand description
Create a Course and it’s draft and live data copies.
- New Courses are all set to
PrivacyLevel::Unlisted
by default
§Flow:
- Create a Course and its two data copies with
Create
- Optionally update Course info such as privacy, author with [
Update
] - Make updates to draft data:
a. Patch Course data through
UpdateDraftData
- Finalize draft changes by calling
Publish
§Authorization
- TokenUser
- One of
Admin
,AdminAsset
, orManageSelfAsset
Trait Implementations§
Source§impl ApiEndpoint for Create
impl ApiEndpoint for Create
Source§type Req = CourseCreateRequest
type Req = CourseCreateRequest
The request type for this endpoint.
Source§type Res = CreateResponse<CourseId>
type Res = CreateResponse<CourseId>
The response type for this endpoint.
Source§type Path = CourseCreatePath
type Path = CourseCreatePath
The path type for this endpoint.
Source§type Err = MetadataNotFound
type Err = MetadataNotFound
The (inner) error type for this endpoint.
Auto Trait Implementations§
impl Freeze for Create
impl RefUnwindSafe for Create
impl Send for Create
impl Sync for Create
impl Unpin for Create
impl UnwindSafe for Create
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more