| 12345678910111213 |
- import { Middleware, StatusCodes, Request, Response, NextFunction } from '../base/http';
- import { $ } from '../base/i18n';
- import { MiddlewareOrder } from './MiddlewareOrder';
- class NotFoundErrorHandler extends Middleware {
- protected order = MiddlewareOrder.NotFoundErrorHandler;
- protected route = null;
- protected action = (req: Request, res: Response, next: NextFunction): any => {
- res.status(StatusCodes.NOT_FOUND).send($('org.crazydoctor.extress.httpError.404', { url: req.url }));
- };
- }
- export { NotFoundErrorHandler };
|