Permalink
Browse files

Lint the codebase

  • Loading branch information...
1 parent 7ac9c5d commit 665c045a8e5c9740d7153232dc963e7d6a2c5ed2 @aron aron committed Jul 1, 2012
Showing with 8 additions and 6 deletions.
  1. +7 −5 lib/db/sqlite.js
  2. +1 −1 lib/utils.js
View
@@ -26,7 +26,9 @@ DB.prototype = {
self.connection.serialize(function () {
sql.split(/\n/).forEach(function (sql) {
sql = sql.trim();
- if (sql) self.connection.run(sql);
+ if (sql) {
+ self.connection.run(sql);
+ }
});
fn();
});
@@ -197,16 +199,16 @@ DB.prototype = {
},
touchLogin: function (id, fn) {
this.connection.run(templates.touchLogin, [id], function (err) {
- if (err || !this.changes) {
- return fn(!err && !results.length ? 'not-found' : err);
+ if (err) {
+ return fn(err);
}
fn(null, this.lastID);
});
},
updateUserKey: function (id, key, fn) {
this.connection.run(templates.updateUserKey, [key, id], function (err) {
- if (err || !this.changes) {
- return fn(!err && !results.length ? 'not-found' : err);
+ if (err) {
+ return fn(err);
}
fn(null, this.lastID);
});
View
@@ -194,5 +194,5 @@ module.exports = {
}
});
return params.join(',');
- },
+ }
};

0 comments on commit 665c045

Please sign in to comment.