mirror of
https://github.com/GSA/notifications-api.git
synced 2026-08-25 00:33:41 -04:00
reformat
This commit is contained in:
@@ -7,15 +7,16 @@ from app.v2.template import v2_template_blueprint
|
||||
from app.v2.template.template_schemas import get_template_by_id_request
|
||||
|
||||
|
||||
@v2_template_blueprint.route("/<template_id>", methods=['GET'])
|
||||
@v2_template_blueprint.route("/<template_id>/version/<int:version>", methods=['GET'])
|
||||
@v2_template_blueprint.route("/<template_id>", methods=["GET"])
|
||||
@v2_template_blueprint.route("/<template_id>/version/<int:version>", methods=["GET"])
|
||||
def get_template_by_id(template_id, version=None):
|
||||
_data = {'id': template_id}
|
||||
_data = {"id": template_id}
|
||||
if version:
|
||||
_data['version'] = version
|
||||
_data["version"] = version
|
||||
|
||||
data = validate(_data, get_template_by_id_request)
|
||||
|
||||
template = templates_dao.dao_get_template_by_id_and_service_id(
|
||||
template_id, authenticated_service.id, data.get('version'))
|
||||
template_id, authenticated_service.id, data.get("version")
|
||||
)
|
||||
return jsonify(template.serialize_for_v2()), 200
|
||||
|
||||
Reference in New Issue
Block a user