controllers/chordTypes

Chord Types Controller file Contains an object with each controller related to the ChordType model
Description:
  • Chord Types Controller file Contains an object with each controller related to the ChordType model
Source:

Requires

Methods

(async, static) getAll(res, next) → {void}

Description:
  • Retrieves all chord types list throw an object. This function calls the service to get all chord types from the database and sends the result as a response.
Source:
Parameters:
Name Type Description
res Object The response object to send the result.
next function The next middleware to pass control in case of an error.
Throws:
Throws an error if there is an issue with the database.
Type
Error
Returns:
Type
void

(async, static) getById(req, res, next) → {void}

Description:
  • Retrieves a chord types object. This function calls the service to get all chord types from the database and sends the result as a response.
Source:
Parameters:
Name Type Description
req Object The request object containing the chord type ID in the URL parameters.
res Object The response object to send the result.
next function The next middleware to pass control in case of an error.
Throws:
Throws an error if there is an issue with the database.
Type
Error
Returns:
Type
void