Skip to content

Commit 714651f

Browse files
authored
Merge pull request #46 from amitsinha07/main
fix: applied logs for static and dynamic form
2 parents f0fd0c7 + 723c36e commit 714651f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/controllers/form-controller.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ export const submitForm = async (req: Request, res: Response) => {
8989
// Only for dynamic forms: update main session and show success page
9090
if (formConfig.type === 'dynamic') {
9191
// Call mock service FIRST so idType is stored before frontend detects submission
92+
logger.info("++++++ Dynamic form executed ++++++");
9293
await callMockService(domain, submissionData, submission_id, formData);
9394

9495
// Update main session AFTER mock service call - this triggers frontend polling detection
@@ -196,6 +197,7 @@ export const submitForm = async (req: Request, res: Response) => {
196197
// For static forms: call mock service first, then re-save form data
197198
// This prevents the mock framework's saveDataForConfig from overwriting
198199
// the full 17-field form submission with only {submission_id, idType}
200+
logger.info("++++++ Dynamic form executed ++++++");
199201
await callMockService(domain, submissionData, submission_id, formData);
200202

201203
// Re-save form data AFTER callMockService (defensive write)

0 commit comments

Comments
 (0)