ti2 1.0.27 → 1.0.28

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.
Files changed (2) hide show
  1. package/index.js +6 -1
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -200,7 +200,12 @@ module.exports = async ({
200
200
  });
201
201
  }
202
202
  connect(app);
203
- app.use(middleware.mock());
203
+ if (process.env.mock) {
204
+ app.use(middleware.mock());
205
+ }
206
+ app.use((req, res, next) => {
207
+ return res.sendStatus(404);
208
+ })
204
209
  // global error Handling
205
210
  app.use((err, req, res) => {
206
211
  if (process.env.CONSOLE_ERRORS || process.env.JEST_WORKER_ID) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ti2",
3
- "version": "1.0.27",
3
+ "version": "1.0.28",
4
4
  "description": "Tourist Industry Exchange (TI2)",
5
5
  "main": "index.js",
6
6
  "scripts": {