Skip to content

UN-769 - 🚀 Add skipPagesAndTasks Option to /dossiers Route & New Test ✅#368

Merged
sinatragianpaolo merged 3 commits intodevelopfrom
UN-769
Mar 5, 2025
Merged

UN-769 - 🚀 Add skipPagesAndTasks Option to /dossiers Route & New Test ✅#368
sinatragianpaolo merged 3 commits intodevelopfrom
UN-769

Conversation

@sinatragianpaolo
Copy link
Copy Markdown
Contributor

@sinatragianpaolo sinatragianpaolo commented Mar 5, 2025

✨ Changes Introduced:

The POST /dossiers route now accepts a new optional request body parameter:

skipPagesAndTasks: 0 | 1 (default: 0)

If skipPagesAndTasks: 1 is provided, the route skips calling generateLinkedData():

if (!skipPagesAndTasks) {
    await this.generateLinkedData(campaignId);
}

  • 🧪 Added test case:
  • ✅ "Should not call WordpressJsonApiTrigger if skipPagesAndTasks = 1"

📌 Why these changes?
This improvement allows more flexibility when creating dossiers, avoiding unnecessary data generation when not needed. 🚀

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 5, 2025

Tests difference:

New Tests

< Route POST /dossiers - duplication - Should not call WordpressJsonApiTrigger if send skiPagesAndTasks = 1

@sinatragianpaolo sinatragianpaolo merged commit da6648f into develop Mar 5, 2025
@sinatragianpaolo sinatragianpaolo deleted the UN-769 branch March 5, 2025 10:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants