create-sip 0.14.1 → 0.14.2

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.
@@ -3,7 +3,7 @@ import Thing from '../models/thing.js'
3
3
  const ThingController = {
4
4
  async index(req, res) {
5
5
  try {
6
- ThingController.tryIndex(req, res)
6
+ await ThingController.tryIndex(req, res)
7
7
  }catch(error) {
8
8
  res.status(500)
9
9
  res.json({
@@ -22,7 +22,7 @@ const ThingController = {
22
22
  },
23
23
  async show(req, res) {
24
24
  try {
25
- ThingController.tryShow(req, res)
25
+ await ThingController.tryShow(req, res)
26
26
  }catch(error) {
27
27
  res.status(500)
28
28
  res.json({
@@ -41,7 +41,7 @@ const ThingController = {
41
41
  },
42
42
  async create(req, res) {
43
43
  try {
44
- ThingController.tryCreate(req, res)
44
+ await ThingController.tryCreate(req, res)
45
45
  }catch(error) {
46
46
  res.status(500)
47
47
  res.json({
@@ -93,7 +93,7 @@ const ThingController = {
93
93
  },
94
94
  async destroy(req, res) {
95
95
  try {
96
- ThingController.tryDestroy(req, res)
96
+ await ThingController.tryDestroy(req, res)
97
97
  }catch(error) {
98
98
  res.status(500)
99
99
  res.json({
package/manager.js CHANGED
@@ -73,6 +73,8 @@ const genExpressApi = (target) => {
73
73
  console.log('Usable commands:');
74
74
  console.log(' node op create model thing');
75
75
  console.log(' node op create controller thing');
76
+ console.log('The model and controller names must be');
77
+ console.log('given in the singular');
76
78
  }
77
79
 
78
80
  module.exports = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-sip",
3
- "version": "0.14.1",
3
+ "version": "0.14.2",
4
4
  "main": "index.js",
5
5
  "bin": {
6
6
  "create-sip": "create-sip.js"