mirror of
https://github.com/bodyrep/DemoApp.git
synced 2026-01-25 06:32:11 +00:00
add dynmic exercsie list, keywords(hardcoded), datafields(hardcoded), adding exercises from exercise list, and show hide for delete button.
This commit is contained in:
@@ -59,21 +59,6 @@ module.exports = function(app) {
|
||||
res.render('workouts/new', {title: "New workout"});
|
||||
});
|
||||
|
||||
app.get('/workouts/exerciselist', function(req, res) {
|
||||
res.contentType('json');
|
||||
Exercise.find({})
|
||||
.exec(function(err, exercises) {
|
||||
if (err) {
|
||||
return next(err);
|
||||
}
|
||||
if (! exercise) {
|
||||
return res.send(JSON.stringify({ "error": "true" }));
|
||||
}
|
||||
res.send(exercises);
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
||||
app.get('/workouts/:_id', loadWorkout, function(req, res, next){
|
||||
console.log("time" + Moment.utc(req.workout.workoutDate).format("ddd, hA"));
|
||||
|
||||
Reference in New Issue
Block a user