NotFoundErrorHandler.js 602 B

12345678910111213141516
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. const http_1 = require("../base/http");
  4. const i18n_1 = require("../base/i18n");
  5. class NotFoundErrorHandler extends http_1.Middleware {
  6. constructor() {
  7. super(...arguments);
  8. this.order = 9999;
  9. this.route = null;
  10. this.action = (req, res, next) => {
  11. res.status(http_1.StatusCodes.NOT_FOUND).send((0, i18n_1.$$)('org.crazydoctor.expressts.httpError.404', { url: req.url }));
  12. };
  13. }
  14. }
  15. exports.default = NotFoundErrorHandler;
  16. //# sourceMappingURL=NotFoundErrorHandler.js.map