async fn post_new_course(
request_id: RequestId,
pool: Data<PgPool>,
payload: Json<NewCourse>,
user: AuthUser,
app_conf: Data<ApplicationConfiguration>,
jwt_key: Data<JwtKey>,
) -> ControllerResult<Json<Course>>
Expand description
POST /api/v0/main-frontend/courses
- Create a new course.
ยงExample
Request:
POST /api/v0/main-frontend/courses HTTP/1.1
Content-Type: application/json
{
"name": "Introduction to introduction",
"slug": "introduction-to-introduction",
"organization_id": "1b89e57e-8b57-42f2-9fed-c7a6736e3eec"
}