Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow getting/setting publicPreview flag through API for Emails #13609

Open
wants to merge 2 commits into
base: 5.x
Choose a base branch
from

Conversation

kuzmany
Copy link
Member

@kuzmany kuzmany commented Apr 5, 2024

Q A
Bug fix? (use the a.b branch) [ ]
New feature/enhancement? (use the a.x branch) [X]
Deprecations? [ ]
BC breaks? (use the c.x branch) [ ]
Automated tests included? [ ]
Related user documentation PR URL mautic/mautic-documentation#...
Related developer documentation PR URL mautic/developer-documentation#...
Issue(s) addressed Fixes #...

Description:

This PR allow to get and set email flag publicPreview through API.

Steps to test this PR:

  1. Open this PR on Gitpod or pull down for testing locally (see docs on testing PRs here)
  2. Send API request for an email:
GET {{host}}/api/emails/{email_id}
Accept: application/json
Authorization: Bearer {{auth_token}}

the response will containt

"publicPreview": true,

update existing email by putting

"publicPreview": true,

into payload body

the post value can be either:
true: true,"T","Y"
false: false,"F","N"

and verify it has been updated in UI

@kuzmany kuzmany requested a review from mabumusa1 as a code owner April 5, 2024 18:51
@kuzmany kuzmany added ready-to-test PR's that are ready to test enhancement Any improvement to an existing feature or functionality API Anything related to the API email Anything related to email labels Apr 5, 2024
Copy link

codecov bot commented Apr 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 61.08%. Comparing base (693eaf3) to head (ed99162).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##                5.x   #13609   +/-   ##
=========================================
  Coverage     61.08%   61.08%           
- Complexity    33957    33960    +3     
=========================================
  Files          2238     2238           
  Lines        101510   101515    +5     
=========================================
+ Hits          62003    62007    +4     
- Misses        39507    39508    +1     
Files Coverage Δ
.../EmailBundle/Controller/Api/EmailApiController.php 89.39% <100.00%> (+0.86%) ⬆️
app/bundles/EmailBundle/Entity/Email.php 90.29% <ø> (ø)

... and 1 file with indirect coverage changes

Copy link
Sponsor Member

@escopecz escopecz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issue from the code perspective 👍

@escopecz escopecz added pending-test-confirmation PR's that require one test before they can be merged code-review-passed PRs which have passed code review and removed ready-to-test PR's that are ready to test labels Apr 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API Anything related to the API code-review-passed PRs which have passed code review email Anything related to email enhancement Any improvement to an existing feature or functionality pending-test-confirmation PR's that require one test before they can be merged
Projects
Status: ⏳︎ Needs 1 more test
Development

Successfully merging this pull request may close these issues.

None yet

2 participants