Add Organisations endpoints

As part of this we also needed to add:
- schemas for validation
- serialize method for Organisation model
This commit is contained in:
Katie Smith
2018-02-08 14:54:08 +00:00
parent 6a79eedbce
commit 269923ba28
6 changed files with 181 additions and 0 deletions

View File

@@ -107,6 +107,7 @@ def register_blueprint(application):
from app.authentication.auth import requires_admin_auth, requires_auth, requires_no_auth
from app.letters.rest import letter_job
from app.billing.rest import billing_blueprint
from app.organisation.rest import organisation_blueprint
service_blueprint.before_request(requires_admin_auth)
application.register_blueprint(service_blueprint, url_prefix='/service')
@@ -177,6 +178,9 @@ def register_blueprint(application):
service_callback_blueprint.before_request(requires_admin_auth)
application.register_blueprint(service_callback_blueprint)
organisation_blueprint.before_request(requires_admin_auth)
application.register_blueprint(organisation_blueprint, url_prefix='/organisations')
def register_v2_blueprints(application):
from app.v2.inbound_sms.get_inbound_sms import v2_inbound_sms_blueprint as get_inbound_sms