Skip to content
No description, website, or topics provided.
JavaScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
node_modules
READme.md
database.db
database.js
index.js
package-lock.json
package.json
seed.js
server.js

READme.md

Workout API

This API allows you to document which muscles could be trained with which workout variation.

Workout Variations

/api/workout_variation

GET

Will get all workout variations from the workout_variation table

/api/workout_variation/:id

GET

Will get a specific workout variation from the workout_variation table by id

/api/workout_variation

POST

Will add a workout variation to the workout_variation table

/api/workout_variation/:id

PUT

Will update a specific workout variation from the workout_variation table by id

api/workout_variation/:id

DELETE

Will delete a specific workout variation from the workout_variation table by id

Muscles

/api/muscles

GET

Will get all muscles from the muscle table

/api/muscles/:id

GET

Will get a specific muscle from the muscle table by id

/api/muscles

POST

Will add a muscle to the muscle table

/api/muscles/:id

PUT

Will update a specific muscle from the muscle table by id

api

DELETE

/muscles/:id Will delete a specific muscle from the muscle table by id

Many-to-Many

(Used postman to create this relationship)

Workout_Muscle

/api/workout_muscle

GET

Will get all the workout variations that includes the muscle with the specified muscle id

/api/workout_muscle/:id

GET

Will get one workout variation that includes the muscle with the specified muscle id

/api/workout_muscle

POST

Will add a new relationship between muscle_id and workoutVariation_id

/api/workout_muscle/:id

PUT

Will update a workout variation that includes the muscle with the specified muscle id

api/workout_muscle/:id

DELETE

Will delete a workout variation that includes the muscle with the specified muscle id

You can’t perform that action at this time.