mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-01 07:35:34 -05:00
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:
@@ -18,4 +18,4 @@ def get_template_by_id(template_id, version=None):
|
||||
|
||||
template = templates_dao.dao_get_template_by_id_and_service_id(
|
||||
template_id, authenticated_service.id, data.get('version'))
|
||||
return jsonify(template.serialize()), 200
|
||||
return jsonify(template.serialize_for_v2()), 200
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user