zumito-framework 1.14.1 → 1.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.
@@ -227,9 +227,11 @@ export class ZumitoFramework {
227
227
  });
228
228
  });
229
229
  // throw 404 if URL not found
230
- this.app.all('*', (req, res) => {
231
- return ApiResponse.notFoundResponse(res, 'Page not found');
232
- });
230
+ if (!this.settings.webServer?.disableNotFoundHandler) {
231
+ this.app.all('*', (req, res) => {
232
+ return ApiResponse.notFoundResponse(res, 'Page not found');
233
+ });
234
+ }
233
235
  this.app.use((err, req, res, next) => {
234
236
  if (err.name === 'UnauthorizedError') {
235
237
  return ApiResponse.unauthorizedResponse(res, 'Invalid token');
@@ -23,5 +23,6 @@ export interface FrameworkSettings {
23
23
  }[];
24
24
  webServer?: {
25
25
  port: number;
26
+ disableNotFoundHandler?: boolean;
26
27
  };
27
28
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zumito-framework",
3
- "version": "1.14.1",
3
+ "version": "1.14.2",
4
4
  "description": "Discord.js bot framework",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",