added axios client

This commit is contained in:
Milo Schwartz 2024-10-06 12:39:05 -04:00
parent e42ae3dac3
commit c3b7d2e47c
7 changed files with 81 additions and 41 deletions

View file

@ -7,8 +7,11 @@ export function notFoundMiddleware(
res: Response,
next: NextFunction,
) {
const message = `The requests url is not found - ${req.originalUrl}`;
return next(createHttpError(HttpCode.NOT_FOUND, message));
if (req.path.startsWith("/api")) {
const message = `The requests url is not found - ${req.originalUrl}`;
return next(createHttpError(HttpCode.NOT_FOUND, message));
}
return next();
}
export default notFoundMiddleware;