hof 22.7.0-service-paused-beta.4 → 22.7.0-service-paused-beta.5

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
@@ -51,6 +51,12 @@ const loadRoutes = (app, config) => {
51
51
  };
52
52
 
53
53
  const applyErrorMiddlewares = (app, config) => {
54
+ if (config.servicePaused === true || config.servicePaused === 'true') {
55
+ app.use(hofMiddleware.servicePaused({
56
+ logger: config.logger
57
+ }));
58
+ }
59
+
54
60
  app.use(hofMiddleware.notFound({
55
61
  logger: config.logger
56
62
  }));
@@ -240,7 +246,6 @@ function bootstrap(options) {
240
246
  }
241
247
  next();
242
248
  });
243
- app.use('/service-paused', hofMiddleware.servicePaused());
244
249
  };
245
250
 
246
251
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "hof",
3
3
  "description": "A bootstrap for HOF projects",
4
- "version": "22.7.0-service-paused-beta.4",
4
+ "version": "22.7.0-service-paused-beta.5",
5
5
  "license": "MIT",
6
6
  "main": "index.js",
7
7
  "author": "HomeOffice",