mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-11 09:28:27 -04:00
Add feature to mark a template as redacted
Works similarly to the delete template flow, because it’s a destructive, one-way action. Not on the edit template page, because it’s not something you want to be considering every time you’re editing a template. And we saw that people couldn’t find the delete button when it was on this page. Adds a bit more CSS for the `dangerous` banner type, because the content here is quite complicated. Breaking it into a list helps, but the spacing didn’t look right, so needed some tweaking. Can ship independently of the code that shows the redaction, but needs the API first.
This commit is contained in:
@@ -168,6 +168,12 @@ class ServiceAPIClient(NotifyAdminAPIClient):
|
||||
endpoint = "/service/{0}/template/{1}".format(service_id, id_)
|
||||
return self.post(endpoint, data)
|
||||
|
||||
def redact_service_template(self, service_id, id_):
|
||||
return self.post(
|
||||
"/service/{}/template/{}".format(service_id, id_),
|
||||
{'redact_personalisation': True}
|
||||
)
|
||||
|
||||
def get_service_template(self, service_id, template_id, version=None, *params):
|
||||
"""
|
||||
Retrieve a service template.
|
||||
|
||||
Reference in New Issue
Block a user