diff --git a/pg-worker/src/controller/health.controller.ts b/pg-worker/src/controller/health.controller.ts index ca54bcb..5827c56 100644 --- a/pg-worker/src/controller/health.controller.ts +++ b/pg-worker/src/controller/health.controller.ts @@ -1,10 +1,9 @@ -import { Request, Response, NextFunction } from "express"; +import { Request, Response } from "express"; import { performHealthCheck } from "../services/healthCheckService"; export const healthCheck = async ( _req: Request, - res: Response, - _next: NextFunction + res: Response ): Promise => { try { const healthStatus = await performHealthCheck(); diff --git a/pg-worker/src/middlewares/auth.middleware.ts b/pg-worker/src/middlewares/auth.middleware.ts index 6c9dfe3..efca9b5 100644 --- a/pg-worker/src/middlewares/auth.middleware.ts +++ b/pg-worker/src/middlewares/auth.middleware.ts @@ -14,9 +14,10 @@ const secretKeyAuth = ( if (!apikey || apikey !== SECRET_KEY) { res.status(401).json({ error: "Unauthorized" }); + return } next(); }; -export default secretKeyAuth; \ No newline at end of file +export default secretKeyAuth;