Skip to content

Commit

Permalink
auth fix
Browse files Browse the repository at this point in the history
  • Loading branch information
vigneshshettyin committed Jan 12, 2025
1 parent 8a7fc42 commit ca5b9e1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
5 changes: 2 additions & 3 deletions pg-worker/src/controller/health.controller.ts
Original file line number Diff line number Diff line change
@@ -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<void> => {
try {
const healthStatus = await performHealthCheck();
Expand Down
3 changes: 2 additions & 1 deletion pg-worker/src/middlewares/auth.middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@ const secretKeyAuth = (

if (!apikey || apikey !== SECRET_KEY) {
res.status(401).json({ error: "Unauthorized" });
return
}

next();
};

export default secretKeyAuth;
export default secretKeyAuth;

0 comments on commit ca5b9e1

Please sign in to comment.