diff --git a/src/modules/prepopulate/handlers/getAllBankDetails.ts b/src/modules/prepopulate/handlers/getAllBankDetails.ts index d0db47e..60a4dcd 100644 --- a/src/modules/prepopulate/handlers/getAllBankDetails.ts +++ b/src/modules/prepopulate/handlers/getAllBankDetails.ts @@ -1,10 +1,9 @@ -import { verifyOnlyMinglarAdminToken } from '@/common/middlewares/jwt/authForOnlyMinglarAdmin'; +import { verifyMinglarAdminHostToken } from '@/common/middlewares/jwt/authForMinglarAdmin&Host'; import { APIGatewayProxyEvent, APIGatewayProxyResult, Context } from 'aws-lambda'; import { PrismaService } from '../../../common/database/prisma.service'; import { safeHandler } from '../../../common/utils/handlers/safeHandler'; import ApiError from '../../../common/utils/helper/ApiError'; import { PrePopulateService } from '../services/prepopulate.service'; -import { verifyHostToken } from '@/common/middlewares/jwt/authForHost'; const prismaService = new PrismaService(); const prePopulateService = new PrePopulateService(prismaService); @@ -20,7 +19,7 @@ export const handler = safeHandler(async ( } // Authenticate user using the shared authForHost function - await verifyHostToken(token); + await verifyMinglarAdminHostToken(token); const bankDetails = await prePopulateService.getAllBankDetails(); diff --git a/src/modules/prepopulate/handlers/getAllFrequencies.ts b/src/modules/prepopulate/handlers/getAllFrequencies.ts index bcf4796..4cded3b 100644 --- a/src/modules/prepopulate/handlers/getAllFrequencies.ts +++ b/src/modules/prepopulate/handlers/getAllFrequencies.ts @@ -1,10 +1,9 @@ -import { verifyOnlyMinglarAdminToken } from '@/common/middlewares/jwt/authForOnlyMinglarAdmin'; +import { verifyMinglarAdminHostToken } from '@/common/middlewares/jwt/authForMinglarAdmin&Host'; import { APIGatewayProxyEvent, APIGatewayProxyResult, Context } from 'aws-lambda'; import { PrismaService } from '../../../common/database/prisma.service'; import { safeHandler } from '../../../common/utils/handlers/safeHandler'; import ApiError from '../../../common/utils/helper/ApiError'; import { PrePopulateService } from '../services/prepopulate.service'; -import { verifyHostToken } from '@/common/middlewares/jwt/authForHost'; const prismaService = new PrismaService(); const prePopulateService = new PrePopulateService(prismaService); @@ -20,7 +19,7 @@ export const handler = safeHandler(async ( } // Authenticate user using the shared authForHost function - await verifyHostToken(token); + await verifyMinglarAdminHostToken(token); const result = await prePopulateService.getAllFrequencies(); diff --git a/src/modules/prepopulate/handlers/getAllPQQQuesWithAns.ts b/src/modules/prepopulate/handlers/getAllPQQQuesWithAns.ts index cfee25c..64fab4f 100644 --- a/src/modules/prepopulate/handlers/getAllPQQQuesWithAns.ts +++ b/src/modules/prepopulate/handlers/getAllPQQQuesWithAns.ts @@ -1,10 +1,9 @@ -import { verifyOnlyMinglarAdminToken } from '@/common/middlewares/jwt/authForOnlyMinglarAdmin'; +import { verifyMinglarAdminHostToken } from '@/common/middlewares/jwt/authForMinglarAdmin&Host'; import { APIGatewayProxyEvent, APIGatewayProxyResult, Context } from 'aws-lambda'; import { PrismaService } from '../../../common/database/prisma.service'; import { safeHandler } from '../../../common/utils/handlers/safeHandler'; import ApiError from '../../../common/utils/helper/ApiError'; import { PrePopulateService } from '../services/prepopulate.service'; -import { verifyHostToken } from '@/common/middlewares/jwt/authForHost'; const prismaService = new PrismaService(); const prePopulateService = new PrePopulateService(prismaService); @@ -20,7 +19,7 @@ export const handler = safeHandler(async ( } // Authenticate user using the shared authForHost function - await verifyHostToken(token); + await verifyMinglarAdminHostToken(token); const result = await prePopulateService.getAllPQQQuesAndAns(); diff --git a/src/modules/prepopulate/handlers/getBranchByBank.ts b/src/modules/prepopulate/handlers/getBranchByBank.ts index 89d99e3..d616bbb 100644 --- a/src/modules/prepopulate/handlers/getBranchByBank.ts +++ b/src/modules/prepopulate/handlers/getBranchByBank.ts @@ -1,9 +1,9 @@ +import { verifyMinglarAdminHostToken } from "@/common/middlewares/jwt/authForMinglarAdmin&Host"; import { APIGatewayProxyEvent, APIGatewayProxyResult, Context } from "aws-lambda"; import { PrismaService } from "../../../common/database/prisma.service"; import { safeHandler } from "../../../common/utils/handlers/safeHandler"; import ApiError from "../../../common/utils/helper/ApiError"; import { PrePopulateService } from "../services/prepopulate.service"; -import { verifyHostToken } from "@/common/middlewares/jwt/authForHost"; const prismaService = new PrismaService(); const prePopulateService = new PrePopulateService(prismaService); @@ -26,7 +26,7 @@ export const handler = safeHandler(async ( } // 2) Authenticate user - await verifyHostToken(token); + await verifyMinglarAdminHostToken(token); // 3) Get bankXid from query params const bankXid = Number(event.queryStringParameters?.bankXid); diff --git a/src/modules/prepopulate/handlers/getCityByState.ts b/src/modules/prepopulate/handlers/getCityByState.ts index fc3c4cb..bc8ca37 100644 --- a/src/modules/prepopulate/handlers/getCityByState.ts +++ b/src/modules/prepopulate/handlers/getCityByState.ts @@ -1,9 +1,9 @@ +import { verifyMinglarAdminHostToken } from "@/common/middlewares/jwt/authForMinglarAdmin&Host"; import { APIGatewayProxyEvent, APIGatewayProxyResult, Context } from "aws-lambda"; import { PrismaService } from "../../../common/database/prisma.service"; import { safeHandler } from "../../../common/utils/handlers/safeHandler"; import ApiError from "../../../common/utils/helper/ApiError"; import { PrePopulateService } from "../services/prepopulate.service"; -import { verifyHostToken } from "@/common/middlewares/jwt/authForHost"; const prismaService = new PrismaService(); const prePopulateService = new PrePopulateService(prismaService); @@ -26,7 +26,7 @@ export const handler = safeHandler(async ( } // 2) Authenticate user - await verifyHostToken(token); + await verifyMinglarAdminHostToken(token); // 3) Get bankXid from query params const stateXid = Number(event.queryStringParameters?.stateXid);