controllers/courseController

Controller for course-related operations.

Methods

(static) create(req, res) → {Promise.<void>}

Create a new course.
Source:
Parameters:
Name Type Description
req Request The request object.
res Response The response object.
Returns:
Type:
Promise.<void>

(static) delete(req, res) → {Promise.<void>}

Delete a course
Source:
Parameters:
Name Type Description
req Request The request object.
res Response The response object.
Returns:
Type:
Promise.<void>

(static) getAll(req, res) → {Promise.<void>}

Get all courses with pagination.
Source:
Parameters:
Name Type Description
req Request The request object.
res Response The response object.
Returns:
Type:
Promise.<void>

(static) getById(req, res) → {Promise.<void>}

Get a course by its ID.
Source:
Parameters:
Name Type Description
req Request The request object.
res Response The response object.
Returns:
Type:
Promise.<void>

(static) getDates(req, res)

Delete a Course
Source:
Parameters:
Name Type Description
req Request
res Response

(static) search(req, res) → {Promise.<void>}

Search for courses based on the provided search terms.
Source:
Parameters:
Name Type Description
req Request The request object.
res Response The response object.
Returns:
Type:
Promise.<void>

(static) update(req, res) → {Promise.<void>}

Update a course.
Source:
Parameters:
Name Type Description
req Request The request object.
res Response The response object.
Returns:
Type:
Promise.<void>