diff --git a/README.md b/README.md index 6f7d5f4f..5561c4fb 100644 --- a/README.md +++ b/README.md @@ -64,7 +64,7 @@ $ npm install This command does a few things: * First it will install the dependencies needed for the application to run. * If you're running in a development environment, it will then also install development dependencies needed for testing and running your application. -* Finally, when the install process is over, npm will initiate a bower install command to install all the front-end modules needed for the application +* Finally, when the install process is over, npm will initiate a bower install command to install all the front-end modules needed for the application. ## Running Your Application After the install process is over, you'll be able to run your application using Grunt, just run grunt default task: @@ -110,7 +110,7 @@ Windows users can follow instructions found [here](http://www.websense.com/suppo To generate the key and certificate and place them in the *config/sslcert* folder. ## Getting Started With MEAN.JS -You have your application running but there are a lot of stuff to understand, we recommend you'll go over the [Official Documentation](http://meanjs.org/docs.html). +You have your application running but there is a lot of stuff to understand, we recommend you'll go over the [Official Documentation](http://meanjs.org/docs.html). In the docs we'll try to explain both general concepts of MEAN components and give you some guidelines to help you improve your development process. We tried covering as many aspects as possible, and will keep update it by your request, you can also help us develop the documentation better by checking out the *gh-pages* branch of this repository. ## Community diff --git a/app/controllers/users/users.password.server.controller.js b/app/controllers/users/users.password.server.controller.js index 1d4ae65e..63c20b5d 100644 --- a/app/controllers/users/users.password.server.controller.js +++ b/app/controllers/users/users.password.server.controller.js @@ -12,6 +12,8 @@ var _ = require('lodash'), nodemailer = require('nodemailer'), async = require('async'), crypto = require('crypto'); + +var smtpTransport = nodemailer.createTransport(config.mailer.options); /** * Forgot for reset password (forgot POST) @@ -65,7 +67,6 @@ exports.forgot = function(req, res, next) { }, // If valid email, send reset email using service function(emailHTML, user, done) { - var smtpTransport = nodemailer.createTransport(config.mailer.options); var mailOptions = { to: user.email, from: config.mailer.from, @@ -77,6 +78,10 @@ exports.forgot = function(req, res, next) { res.send({ message: 'An email has been sent to ' + user.email + ' with further instructions.' }); + } else { + return res.status(400).send({ + message: 'Failure sending email' + }); } done(err); @@ -167,7 +172,6 @@ exports.reset = function(req, res, next) { }, // If valid email, send reset email using service function(emailHTML, user, done) { - var smtpTransport = nodemailer.createTransport(config.mailer.options); var mailOptions = { to: user.email, from: config.mailer.from, @@ -242,4 +246,4 @@ exports.changePassword = function(req, res) { message: 'User is not signed in' }); } -}; \ No newline at end of file +}; diff --git a/app/models/user.server.model.js b/app/models/user.server.model.js index 9370da01..840464af 100755 --- a/app/models/user.server.model.js +++ b/app/models/user.server.model.js @@ -50,7 +50,7 @@ var UserSchema = new Schema({ }, username: { type: String, - unique: 'testing error message', + unique: 'Username already exists', required: 'Please fill in a username', trim: true }, diff --git a/bower.json b/bower.json index 3d7a7451..a49e0339 100644 --- a/bower.json +++ b/bower.json @@ -9,7 +9,8 @@ "angular-animate": "~1.2", "angular-mocks": "~1.2", "angular-bootstrap": "~0.11.2", + "angular-bootstrap": "~0.12.0", "angular-ui-utils": "~0.1.1", "angular-ui-router": "~0.2.11" } -} \ No newline at end of file +} diff --git a/gruntfile.js b/gruntfile.js index 45554857..fd0b02a2 100644 --- a/gruntfile.js +++ b/gruntfile.js @@ -31,7 +31,7 @@ module.exports = function(grunt) { clientViews: { files: watchFiles.clientViews, options: { - livereload: true, + livereload: true } }, clientJS: { @@ -59,7 +59,7 @@ module.exports = function(grunt) { }, csslint: { options: { - csslintrc: '.csslintrc', + csslintrc: '.csslintrc' }, all: { src: watchFiles.clientCSS diff --git a/karma.conf.js b/karma.conf.js index e85f39b7..0f5ab311 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -16,7 +16,6 @@ module.exports = function(config) { // Test results reporter to use // Possible values: 'dots', 'progress', 'junit', 'growl', 'coverage' - //reporters: ['progress'], reporters: ['progress'], // Web server port @@ -49,4 +48,4 @@ module.exports = function(config) { // If true, it capture browsers, run tests and exit singleRun: true }); -}; \ No newline at end of file +}; diff --git a/public/modules/core/views/header.client.view.html b/public/modules/core/views/header.client.view.html index eb6ac6df..541aa3a8 100644 --- a/public/modules/core/views/header.client.view.html +++ b/public/modules/core/views/header.client.view.html @@ -11,7 +11,7 @@