From 7cbbb3af4ea122fabac2fb452d9df804a531b1f7 Mon Sep 17 00:00:00 2001 From: Tim Griesser Date: Wed, 29 May 2013 21:58:59 -0400 Subject: [PATCH] lint fixes & bcrypt-nodejs --- core/shared/models/base.js | 4 +--- core/shared/models/setting.js | 3 +-- core/shared/models/user.js | 4 ++-- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/core/shared/models/base.js b/core/shared/models/base.js index c703666245..0133a335b1 100644 --- a/core/shared/models/base.js +++ b/core/shared/models/base.js @@ -2,9 +2,7 @@ "use strict"; - var _ = require('underscore'), - GhostBookshelf, - BookshelfBase, + var GhostBookshelf, Bookshelf = require('bookshelf'), config = require('../../../config'); diff --git a/core/shared/models/setting.js b/core/shared/models/setting.js index c31ba0f711..e27f0612b4 100644 --- a/core/shared/models/setting.js +++ b/core/shared/models/setting.js @@ -5,8 +5,7 @@ Settings, GhostBookshelf = require('./base'), _ = require('underscore'), - when = require('when'), - SettingsProvider; + when = require('when'); Setting = GhostBookshelf.Model.extend({ diff --git a/core/shared/models/user.js b/core/shared/models/user.js index 8e30d939ed..b05bad283b 100644 --- a/core/shared/models/user.js +++ b/core/shared/models/user.js @@ -6,7 +6,7 @@ _ = require('underscore'), when = require('when'), nodefn = require('when/node/function'), - bcrypt = require('bcrypt'), + bcrypt = require('bcrypt-nodejs'), Posts = require('./post').Posts, GhostBookshelf = require('./base'); @@ -33,7 +33,7 @@ // Clone the _user so we don't expose the hashed password unnecessarily userData = _.extend({}, _user); - return nodefn.call(bcrypt.hash, _user.password, 10).then(function (hash) { + return nodefn.call(bcrypt.hash, _user.password, null, null).then(function (hash) { userData.password = hash; return GhostBookshelf.Model.add.call(User, userData); });