mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-23 00:41:35 -05:00
Get rid of an unneeded flag - destination endpoint is slimmer now and doesnt need it
This commit is contained in:
@@ -240,11 +240,10 @@ def preview_letter_template_by_notification_id(service_id, notification_id, file
|
|||||||
|
|
||||||
if overlay:
|
if overlay:
|
||||||
path = '/precompiled/overlay.{}'.format(file_type)
|
path = '/precompiled/overlay.{}'.format(file_type)
|
||||||
query_string = '?invert=1'
|
|
||||||
content = pdf_file
|
content = pdf_file
|
||||||
elif file_type == 'png':
|
elif file_type == 'png':
|
||||||
path = '/precompiled-preview.png'
|
|
||||||
query_string = '?hide_notify=true' if page_number == '1' else ''
|
query_string = '?hide_notify=true' if page_number == '1' else ''
|
||||||
|
path = '/precompiled-preview.png' + query_string
|
||||||
else:
|
else:
|
||||||
path = None
|
path = None
|
||||||
|
|
||||||
@@ -260,7 +259,7 @@ def preview_letter_template_by_notification_id(service_id, notification_id, file
|
|||||||
)
|
)
|
||||||
|
|
||||||
if path:
|
if path:
|
||||||
url = current_app.config['TEMPLATE_PREVIEW_API_HOST'] + path + query_string
|
url = current_app.config['TEMPLATE_PREVIEW_API_HOST'] + path
|
||||||
response_content = _get_png_preview_or_overlaid_pdf(url, content, notification.id, json=False)
|
response_content = _get_png_preview_or_overlaid_pdf(url, content, notification.id, json=False)
|
||||||
else:
|
else:
|
||||||
response_content = content
|
response_content = content
|
||||||
|
|||||||
@@ -1102,8 +1102,8 @@ def test_preview_letter_template_precompiled_s3_error(
|
|||||||
"filetype, post_url, overlay",
|
"filetype, post_url, overlay",
|
||||||
[
|
[
|
||||||
('png', 'precompiled-preview.png', None),
|
('png', 'precompiled-preview.png', None),
|
||||||
('png', 'precompiled/overlay.png?invert=1', 1),
|
('png', 'precompiled/overlay.png', 1),
|
||||||
('pdf', 'precompiled/overlay.pdf?invert=1', 1)
|
('pdf', 'precompiled/overlay.pdf', 1)
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
def test_preview_letter_template_precompiled_png_file_type_or_pdf_with_overlay(
|
def test_preview_letter_template_precompiled_png_file_type_or_pdf_with_overlay(
|
||||||
|
|||||||
Reference in New Issue
Block a user