Add workout endpoint and tests

POST http://localhost:3000/api/v1/workouts

{
  "location_id": 3,
  "title": "37 Sections for Time",
  "date": "2004-10-19 10:23:54+02",
  "lat": 42.366032,
  "lng": -71.127376,
  "type_id": 5
}

Bug fix

return of insert changed from array to value

Update workout

PUT http://localhost:3000/api/v1/workouts/6

{
  "location_id": 3,
  "title": "38 Sections for Time",
  "date": "2004-10-19 10:23:54+02",
  "lat": 42.366032,
  "lng": -71.127376,
  "type_id": 5
}

Add standard knex functions

Add standard knex functions

doSelect, doInsert, doUpdate, doDelete

fixed bug

Various fixes based on feedback

 - moved require to top of screen
 - simplified doSelect function
 - updated doInsert to return the entire object
 - removed debugging logging

Additional updates as a result of review

- returning back a single object, instead of an array, for doInsert
- returning null resultset if error and returning raw number of records
affected if success for doUpdate, doDelete
- Added endline at end of file

Add GET workout

In process updating authorization

Add token protection to workout endpoints

Cleaning the code

Update existing models to use knex

Add travis build config file

Add tests galore for workout get; create and update next

Minor tweak

Automated tests for workout create

Finished workouts?

Add database changes

Add workout endpoint and tests

POST http://localhost:3000/api/v1/workouts
GET http://localhost:3000/api/v1/workouts/:wid
PUT http://localhost:3000/api/v1/workouts/:wid

Update workout

PUT http://localhost:3000/api/v1/workouts/6

{
  "location_id": 3,
  "title": "38 Sections for Time",
  "date": "2004-10-19 10:23:54+02",
  "lat": 42.366032,
  "lng": -71.127376,
  "type_id": 5
}

Add standard knex functions

Add GET workout

In process updating authorization

Add token protection to workout endpoints

Cleaning the code

Add tests galore for workout get; create and update next

Minor tweak

Automated tests for workout create

Finished workouts?

Add database changes

Add standard knex functions

doSelect, doInsert, doUpdate, doDelete

fixed bug

Various fixes based on feedback

 - moved require to top of screen
 - simplified doSelect function
 - updated doInsert to return the entire object
 - removed debugging logging

Additional updates as a result of review

- returning back a single object, instead of an array, for doInsert
- returning null resultset if error and returning raw number of records
affected if success for doUpdate, doDelete
- Added endline at end of file

Update existing models to use knex

Add travis build config file