Skip to content

Update the course description by an instructor

Gauri Pandharinath Bodke edited this page Jun 15, 2022 · 1 revision

Update the description of the course by the instructor

Returns json with course details

URL: /api/instructor/course/<courseId>/description

Method: PUT

Authorization required: Yes

Request body

Example:

{
    
    "description":"welcome! This is my Software Engineering Course"
}

Success Response

Condition: when instructor updates course description

Code : 200 Ok

Example:

{
    "ID": 3,
    "CreatedAt": "2022-02-23T16:48:34.753837183-05:00",
    "UpdatedAt": "2022-03-29T22:29:56.523498603-04:00",
    "DeletedAt": null,
    "title": "Neural",
    "description": "welcome! This is my Software Engineering Course",
    "isPublished": false,
    "publishedAt": null,
    "instructorId": 3,
    "Enrollments": null,
    "Modules": null
}

Error Responses

Condition: If the input request url has course which has not created.

Code: 404 not found

Example:

{
    "error": "course not found"
}

Condition: If the instructor and course doesnot match.

Code: 401 Unauthorized

Example:

{
    "error": "Unauthorised access for this course"
}

Condition: If the JWT-token is not present in the request headers.

Code: 401 Unauthorized

Example:

{
    "error": "token not found"
}

Condition: If the JWT-token is expired.

Code: 401 Unauthorized

Example:

{
    "error": "user unauthorized"
}

Condition: Unknown error.

Code: 500 Internal Server Error

Example:

{
    "error": "internal server error"
}
Clone this wiki locally