mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-06 19:28:25 -04:00
WIP refactor letter preview function
This commit is contained in:
@@ -95,21 +95,21 @@ def view_letter_notification_as_preview(service_id, notification_id, filetype):
|
|||||||
if filetype not in ('pdf', 'png'):
|
if filetype not in ('pdf', 'png'):
|
||||||
abort(404)
|
abort(404)
|
||||||
|
|
||||||
notification = notification_api_client.get_notification(service_id, notification_id)
|
# notification = notification_api_client.get_notification(service_id, notification_id)
|
||||||
notification['template'].update({'reply_to_text': notification['reply_to_text']})
|
# notification['template'].update({'reply_to_text': notification['reply_to_text']})
|
||||||
|
|
||||||
template = get_template(
|
# template = get_template(
|
||||||
notification['template'],
|
# notification['template'],
|
||||||
current_service,
|
# current_service,
|
||||||
letter_preview_url=url_for(
|
# letter_preview_url=url_for(
|
||||||
'.view_letter_notification_as_preview',
|
# '.view_letter_notification_as_preview',
|
||||||
service_id=service_id,
|
# service_id=service_id,
|
||||||
notification_id=notification_id,
|
# notification_id=notification_id,
|
||||||
filetype='png',
|
# filetype='png',
|
||||||
),
|
# ),
|
||||||
)
|
# )
|
||||||
|
|
||||||
template.values = notification['personalisation']
|
# template.values = notification['personalisation']
|
||||||
|
|
||||||
try:
|
try:
|
||||||
preview = notification_api_client.get_notification_letter_preview(
|
preview = notification_api_client.get_notification_letter_preview(
|
||||||
|
|||||||
Reference in New Issue
Block a user