controllers/trainingController

Controller for training-related operations.

Methods

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

Create a new training.
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 training
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 trainings 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 training by its ID.
Source:
Parameters:
Name Type Description
req Request The request object.
res Response The response object.
Returns:
Type:
Promise.<void>

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

Uploads a cover image for a training.
Source:
Parameters:
Name Type Description
req Request The request object.
res Response The response object.
Returns:
Type:
Promise.<void>

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

Search for trainings 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 training.
Source:
Parameters:
Name Type Description
req Request The request object.
res Response The response object.
Returns:
Type:
Promise.<void>

(static) updateCover(req, res)

Update a Training Cover
Source:
Parameters:
Name Type Description
req Request
res Response