Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Added *.swp

  • Loading branch information...
commit 1aae7f907c2f83196b3ac004bc5c2639871629c4 1 parent 8a9a65a
Jim Whitson authored

Showing 2 changed files with 4 additions and 9 deletions. Show diff stats Hide diff stats

  1. +1 0  .gitignore
  2. +3 9 routes/index.js
1  .gitignore
@@ -6,6 +6,7 @@ lib-cov
6 6 *.out
7 7 *.pid
8 8 *.gz
  9 +*.swp
9 10
10 11 pids
11 12 logs
12 routes/index.js
@@ -80,9 +80,7 @@ exports.edit = function(req, res) {
80 80 exports.add = function(req, res) {
81 81 if(req.method === 'GET') {
82 82 Tag.find({}, function(e, d) {
83   - if(e) {
84   - console.log(e);
85   - }
  83 + dumpEror(e);
86 84 res.render('newdoc', {title: 'Add a document', tags: d});
87 85 });
88 86 }
@@ -93,18 +91,14 @@ exports.add = function(req, res) {
93 91
94 92 exports.listByTag = function(req, res) {
95 93 Doc.find({tags: req.params.tag}, function(e, d) {
96   - if(e) {
97   - console.log(e);
98   - }
  94 + dumpError(e);
99 95 res.render('index', {title: 'Documents with tag '+req.params.tag, docs: d});
100 96 });
101 97 };
102 98
103 99 exports.listByCat = function(req, res) {
104 100 Doc.find({category: req.params.category}, function(e, d) {
105   - if(e) {
106   - console.log(e);
107   - }
  101 + dumpError(e);
108 102 res.render('index', {title: 'Documents in category '+req.params.category, docs: d});
109 103 });
110 104 };

0 comments on commit 1aae7f9

Please sign in to comment.
Something went wrong with that request. Please try again.