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