Removed URI from preview response

This commit is contained in:
Ken Tsang
2017-04-04 16:14:54 +01:00
parent 1e510487e2
commit eba88b08c5
3 changed files with 3 additions and 6 deletions

View File

@@ -29,8 +29,7 @@ def post_template_preview(template_id):
check_placeholders(template_object)
resp = create_post_template_preview_response(template=template,
body=str(template_object),
url_root=request.url_root)
body=str(template_object))
return jsonify(resp), 200

View File

@@ -68,12 +68,11 @@ post_template_preview_response = {
}
def create_post_template_preview_response(template, body, url_root):
def create_post_template_preview_response(template, body):
return {
"id": template.id,
"type": template.template_type,
"version": template.version,
"body": body,
"subject": template.subject,
"uri": "{}v2/template/{}/preview".format(url_root, template.id)
"subject": template.subject
}