rename template.serialize to serialize_for_v2

make it clear that this is for the public api, and we shouldn't add
fields to it without considering impacts

also add the broadcast_messages relationship on service and template to
the exclude from the marshmallow schemas, so it's not included elsewhere
This commit is contained in:
Leo Hemsted
2020-07-06 16:41:53 +01:00
parent 5f337f7914
commit 0282a76bf7
7 changed files with 10 additions and 10 deletions

View File

@@ -14,5 +14,5 @@ def get_templates():
templates = templates_dao.dao_get_all_templates_for_service(authenticated_service.id, data.get('type'))
return jsonify(
templates=[template.serialize() for template in templates]
templates=[template.serialize_for_v2() for template in templates]
), 200