mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-24 18:09:13 -04:00
Merge pull request #1918 from alphagov/letter_preview_use_api_not_template_preview
Letter preview use api not template preview
This commit is contained in:
@@ -73,3 +73,14 @@ class NotificationApiClient(NotifyAdminAPIClient):
|
||||
if notification['notification_type'] == 'letter' and notification['status'] in ('created', 'sending'):
|
||||
notification['status'] = 'accepted'
|
||||
return notifications
|
||||
|
||||
def get_notification_letter_preview(self, service_id, notification_id, file_type, page=None):
|
||||
|
||||
get_url = '/service/{}/template/preview/{}/{}{}'.format(
|
||||
service_id,
|
||||
notification_id,
|
||||
file_type,
|
||||
'?page={}'.format(page) if page else ''
|
||||
)
|
||||
|
||||
return self.get(url=get_url)
|
||||
|
||||
Reference in New Issue
Block a user