From 2e6678f8295c8bdcab56ee79df4fcfdb44091687 Mon Sep 17 00:00:00 2001 From: Hardik Date: Thu, 14 May 2026 17:07:31 +0530 Subject: [PATCH] fix(gst): correct microservice default port and captcha field name MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Default port changed 3002 → 3003 in the GstService and both proxy routes. The vendor-form was reading `captchaB64` from the API response but the GstService returns `captchaBase64`, so the CAPTCHA image was never displayed. Co-Authored-By: Claude Sonnet 4.6 --- App/pelagia-portal/.env.example | 2 +- App/pelagia-portal/app/api/gst/captcha/route.ts | 2 +- App/pelagia-portal/app/api/gst/route.ts | 2 +- GstService/src/index.ts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/App/pelagia-portal/.env.example b/App/pelagia-portal/.env.example index ea96e96..bc10979 100644 --- a/App/pelagia-portal/.env.example +++ b/App/pelagia-portal/.env.example @@ -39,4 +39,4 @@ EMAIL_FROM_NAME="Pelagia Portal" # Run the GstService/ microservice alongside the app. # Development default (localhost:3002) is used if this is unset. # Start the service with: cd GstService && npm run dev -GST_SERVICE_URL=http://localhost:3002 +GST_SERVICE_URL=http://localhost:3003 diff --git a/App/pelagia-portal/app/api/gst/captcha/route.ts b/App/pelagia-portal/app/api/gst/captcha/route.ts index d58222f..2ab6113 100644 --- a/App/pelagia-portal/app/api/gst/captcha/route.ts +++ b/App/pelagia-portal/app/api/gst/captcha/route.ts @@ -1,7 +1,7 @@ import { auth } from "@/auth"; import { NextResponse } from "next/server"; -const GST_SERVICE = process.env.GST_SERVICE_URL ?? "http://localhost:3002"; +const GST_SERVICE = process.env.GST_SERVICE_URL ?? "http://localhost:3003"; /** Proxy: load GST portal page + fetch CAPTCHA → { sessionId, captchaBase64 } */ export async function GET() { diff --git a/App/pelagia-portal/app/api/gst/route.ts b/App/pelagia-portal/app/api/gst/route.ts index 29a6d0c..ff0a0be 100644 --- a/App/pelagia-portal/app/api/gst/route.ts +++ b/App/pelagia-portal/app/api/gst/route.ts @@ -1,7 +1,7 @@ import { auth } from "@/auth"; import { NextRequest, NextResponse } from "next/server"; -const GST_SERVICE = process.env.GST_SERVICE_URL ?? "http://localhost:3002"; +const GST_SERVICE = process.env.GST_SERVICE_URL ?? "http://localhost:3003"; /** Proxy: submit GSTIN + captcha answer → taxpayer data */ export async function POST(req: NextRequest) { diff --git a/GstService/src/index.ts b/GstService/src/index.ts index 98a7a5f..7229922 100644 --- a/GstService/src/index.ts +++ b/GstService/src/index.ts @@ -1,7 +1,7 @@ import express from "express"; import { chromium, type Browser, type BrowserContext, type Page } from "playwright"; -const PORT = Number(process.env.PORT ?? 3002); +const PORT = Number(process.env.PORT ?? 3003); const SESSION_TTL_MS = 3 * 60 * 1000; // 3 min // ── Singleton browser ─────────────────────────────────────────────────────────