mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-01 15:46:07 -05:00
Organisation services API endpoints
This commit is contained in:
@@ -17,6 +17,7 @@ from app.dao.api_key_dao import (
|
||||
get_unsigned_secret,
|
||||
expire_api_key)
|
||||
from app.dao.inbound_numbers_dao import dao_allocate_number_for_service
|
||||
from app.dao.organisation_dao import dao_get_organisation_by_service_id
|
||||
from app.dao.service_sms_sender_dao import (
|
||||
dao_add_sms_sender_for_service,
|
||||
dao_update_service_sms_sender,
|
||||
@@ -664,6 +665,12 @@ def get_service_sms_senders_for_service(service_id):
|
||||
return jsonify([sms_sender.serialize() for sms_sender in sms_senders]), 200
|
||||
|
||||
|
||||
@service_blueprint.route('/<uuid:service_id>/organisation', methods=['GET'])
|
||||
def get_organisation_for_service(service_id):
|
||||
organisation = dao_get_organisation_by_service_id(service_id=service_id)
|
||||
return jsonify(organisation.serialize() if organisation else {}), 200
|
||||
|
||||
|
||||
@service_blueprint.route('/unique', methods=["GET"])
|
||||
def is_service_name_unique():
|
||||
name, email_from = check_request_args(request)
|
||||
|
||||
Reference in New Issue
Block a user