jcc-express-mvc 1.0.2 → 1.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jcc-express-mvc",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "description": "express mvc structure",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -83,7 +83,7 @@ class Command {
83
83
 
84
84
  addModel(modelName) {
85
85
  try {
86
- let modelPath = path.resolve(`${rootPath}/app/Model`);
86
+ let modelPath = path.resolve(`${rootPath}/app/Models`);
87
87
  if (fs.existsSync(`${modelPath}/${modelName}.js`)) {
88
88
  return console.log(`${modelName} model already exist`.yellow);
89
89
  }
@@ -7,7 +7,7 @@ class Request {
7
7
  validationErrors(request, response) {
8
8
  const errors = {};
9
9
  response.locals.error = errors;
10
- errors["email"] = req.flash("error");
10
+ errors["email"] = request.flash("error");
11
11
  response.locals.errors = request.flash("validationErrors")[0];
12
12
  response.locals.old = request.flash("old")[0];
13
13
  request.validate = async (formData) =>