Skip to content

Commit 2a9c1a9

Browse files
committed
* FIXED: Not standardized response on error (davellanedam/node-express-mongodb-jwt-rest-api-skeleton#4)
* NPM updated
1 parent e1cc763 commit 2a9c1a9

File tree

4 files changed

+17
-7
lines changed

4 files changed

+17
-7
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## v.1.2.4 (Dec 1, 2018)
2+
* FIXED: Password not encrypted when updating in profile [\#4](https://github.com./davellanedam/node-express-mongodb-jwt-rest-api-skeleton/issues/4)
3+
* NPM updated
4+
15
## v.1.2.3 (Nov 28, 2018)
26
* FIXED: Password not encrypted when updating in profile [\#3](https://github.com./davellanedam/node-express-mongodb-jwt-rest-api-skeleton/issues/3)
37
* NPM updated

app/controllers/auth.validate.js

+7-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ exports.register = [
1414
.not()
1515
.isEmpty()
1616
.withMessage('IS_EMPTY')
17+
.isEmail()
18+
.withMessage('EMAIL_IS_NOT_VALID')
1719
.normalizeEmail(),
1820
check('password')
1921
.exists()
@@ -50,7 +52,11 @@ exports.login = [
5052
.withMessage('MISSING')
5153
.not()
5254
.isEmpty()
53-
.withMessage('IS_EMPTY'),
55+
.withMessage('IS_EMPTY')
56+
.isLength({
57+
min: 5
58+
})
59+
.withMessage('PASSWORD_TOO_SHORT_MIN_5'),
5460
(req, res, next) => {
5561
try {
5662
validationResult(req).throw()

package-lock.json

+4-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "node-express-mongodb-jwt-rest-api-skeleton",
3-
"version": "1.2.3",
3+
"version": "1.2.4",
44
"description": "Node.js express.js MongoDB JWT REST API - Basic Project Skeleton. Great for building an MVP for your front-end app (Vue, react, angular, or anything that can consume an API)",
55
"license": "MIT",
66
"repository": {
@@ -51,7 +51,7 @@
5151
"faker": "^4.1.0",
5252
"mocha": "^5.2.0",
5353
"mongo-seeding": "^3.0.0",
54-
"prettier": "^1.15.2",
54+
"prettier": "^1.15.3",
5555
"prettier-eslint": "^8.8.2"
5656
},
5757
"keywords": [

0 commit comments

Comments
 (0)