Skip to content

Commit

Permalink
added find day
Browse files Browse the repository at this point in the history
  • Loading branch information
abarnhard committed Jan 5, 2015
1 parent 75a875c commit 509fdc4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions server/routes/config/schedule/get_day.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ module.exports = {
},
handler: function(request, reply){
var params = {date: request.params.date, userId:request.auth.credentials.id};
Schedule.findOne(params, function(err, schedule){
if(err){console.log('ERROR: Workout.getPhases', err);}
reply({schedule:schedule}).code(err ? 418 : 200);
Schedule.findOne(params, function(err, day){
if(err || !day){console.log('ERROR: Schedule.findOne', err);}
reply({day:day}).code(err ? 418 : 200);
});
}
};

0 comments on commit 509fdc4

Please sign in to comment.