services/chordTypes

ChordType service using MongoDB. Performs operations related to the "ChordTypes" Model in MongoDB (Mongoose)
Description:
  • ChordType service using MongoDB. Performs operations related to the "ChordTypes" Model in MongoDB (Mongoose)
Source:

Requires

Methods

(async, static) getAll() → {Object}

Description:
  • Uses mongoose to get all chord types from MongoDB.
Source:
Throws:
Throws an error if there is an issue with the database.
Type
Error
Returns:
- An object containing all chord types data.
Type
Object

(async, static) getById(_id) → {Object}

Description:
  • Uses mongoose to get a unique chordType by its "_id".
Source:
Parameters:
Name Type Description
_id String The id of the chord type to retrieve.
Throws:
Throws an error if there is an issue with the database.
Type
Error
Returns:
- An object containing the selected chord type data.
Type
Object