From 1b30e867072d2667aec1d9438a9fe00e37494f53 Mon Sep 17 00:00:00 2001 From: Pea Tyczynska Date: Mon, 17 Dec 2018 17:50:39 +0000 Subject: [PATCH] Update v2 template schema to include postage --- app/v2/template/template_schemas.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/v2/template/template_schemas.py b/app/v2/template/template_schemas.py index b1b1f4820..ebd0b8342 100644 --- a/app/v2/template/template_schemas.py +++ b/app/v2/template/template_schemas.py @@ -37,6 +37,7 @@ get_template_by_id_response = { "body": {"type": "string"}, "subject": {"type": ["string", "null"]}, "name": {"type": "string"}, + "postage": {"type": "string"} }, "required": ["id", "type", "created_at", "updated_at", "version", "created_by", "body", "name"], } @@ -63,7 +64,8 @@ post_template_preview_response = { "type": {"enum": TEMPLATE_TYPES}, "version": {"type": "integer"}, "body": {"type": "string"}, - "subject": {"type": ["string", "null"]} + "subject": {"type": ["string", "null"]}, + "postage": {"type": "string"} }, "required": ["id", "type", "version", "body"] } @@ -77,5 +79,6 @@ def create_post_template_preview_response(template, template_object): "type": template.template_type, "version": template.version, "body": str(template_object), - "subject": subject + "subject": subject, + "postage": template.postage }