Fix linting errors
This commit is contained in:
@@ -13,7 +13,7 @@ import type {NextFunction, Request, Response} from 'express';
|
||||
* are caught and passed to the Express error middleware, fixing the hanging
|
||||
* request issue when Zod validation fails.
|
||||
*/
|
||||
export function CatchAsync(target: any, propertyKey: string, descriptor: PropertyDescriptor) {
|
||||
export function CatchAsync(target: object, propertyKey: string, descriptor: PropertyDescriptor) {
|
||||
const originalMethod = descriptor.value;
|
||||
|
||||
descriptor.value = function (req: Request, res: Response, next: NextFunction) {
|
||||
|
||||
@@ -155,7 +155,7 @@ export const requestLogger = (req: Request, res: Response, next: NextFunction) =
|
||||
|
||||
// Capture the original res.json to log responses
|
||||
const originalJson = res.json.bind(res);
|
||||
res.json = function (body: any) {
|
||||
res.json = function (body: unknown) {
|
||||
const duration = Date.now() - startTime;
|
||||
logger.response(req, res, res.statusCode, duration);
|
||||
return originalJson(body);
|
||||
|
||||
Reference in New Issue
Block a user