Skip to content

Commit a9452ff

Browse files
author
Chris Sevilleja
committed
more cleanup
1 parent b48324d commit a9452ff

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

app/controllers/todos.js

Whitespace-only changes.

server.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@ var Todo = mongoose.model('Todo', {
2626
// api ---------------------------------------------------------------------
2727
// get all todos
2828
app.get('/api/todos', function(req, res) {
29-
res.send('all todos (via api)');
29+
Todo.find(function(err, todos){
30+
res.json(todos);
31+
});
3032
});
3133

3234
// create todo

0 commit comments

Comments
 (0)