controllers/categoryController

Controller for category-related operations.

Methods

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

Create a new category.
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 category.
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 categories 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 category 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)

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

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

Search for categories 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 category.
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 Category Cover
Source:
Parameters:
Name Type Description
req Request
res Response