mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-03 01:41:05 -05:00
New endpoint to fetch a single reply-to email address by id
This commit is contained in:
@@ -47,7 +47,7 @@ from app.dao.service_whitelist_dao import (
|
||||
dao_remove_service_whitelist
|
||||
)
|
||||
from app.dao.service_email_reply_to_dao import create_or_update_email_reply_to, dao_get_reply_to_by_service_id, \
|
||||
add_reply_to_email_address_for_service, update_reply_to_email_address
|
||||
add_reply_to_email_address_for_service, update_reply_to_email_address, dao_get_reply_to_by_id
|
||||
from app.dao.provider_statistics_dao import get_fragment_count
|
||||
from app.dao.users_dao import get_user_by_id
|
||||
from app.errors import (
|
||||
@@ -531,6 +531,12 @@ def get_email_reply_to_addresses(service_id):
|
||||
return jsonify([i.serialize() for i in result]), 200
|
||||
|
||||
|
||||
@service_blueprint.route('/<uuid:service_id>/email-reply-to/<uuid:reply_to_id>', methods=["GET"])
|
||||
def get_email_reply_to_address(service_id, reply_to_id):
|
||||
result = dao_get_reply_to_by_id(service_id=service_id, reply_to_id=reply_to_id)
|
||||
return jsonify(result.serialize()), 200
|
||||
|
||||
|
||||
@service_blueprint.route('/<uuid:service_id>/email-reply-to', methods=['POST'])
|
||||
def add_service_reply_to_email_address(service_id):
|
||||
# validate the service exists, throws ResultNotFound exception.
|
||||
|
||||
Reference in New Issue
Block a user