Add eslint rule and fix as many issues as possible

This commit is contained in:
Khoa Le
2023-06-19 23:42:04 -04:00
parent e9eacc445d
commit 9d33e4756b
689 changed files with 9446 additions and 21821 deletions
+4 -4
View File
@@ -1,6 +1,6 @@
import { Request, Response, NextFunction } from 'express';
import { validationResult } from 'express-validator';
import { BadRequestError, UnauthorizedRequestError, ValidationError } from '../utils/errors';
import { NextFunction, Request, Response } from "express";
import { validationResult } from "express-validator";
import { UnauthorizedRequestError, ValidationError } from "../utils/errors";
/**
* Validate intended inputs on [req] via express-validator
@@ -20,7 +20,7 @@ const validate = (req: Request, res: Response, next: NextFunction) => {
return next();
} catch (err) {
return next(UnauthorizedRequestError({ message: 'Unauthenticated requests are not allowed. Try logging in' }))
return next(UnauthorizedRequestError({ message: "Unauthenticated requests are not allowed. Try logging in" }))
}
};