chore: suit eslint rules

This commit is contained in:
Ali BARIN
2022-01-16 19:47:16 +01:00
parent f6d7971b4f
commit c09a535653
73 changed files with 1197 additions and 2549 deletions

View File

@@ -1,7 +1,11 @@
import { Request, Response, NextFunction } from 'express';
import { Request, Response } from 'express';
import logger from './logger';
const errorHandler = (err: any, req: Request, res: Response, _next: NextFunction) => {
type Error = {
message: string;
}
const errorHandler = (err: Error, req: Request, res: Response): void => {
if(err.message === 'Not Found') {
res.status(404).end()
} else {