create, edit and use email branding instead of organisation

notable things that have been kept until migration is complete:

* passing in `organisation` to update_service will update email branding
* both `/email-branding` and `/organisation` hit the same code
* service endpoints still return organisation as well as email branding
This commit is contained in:
Leo Hemsted
2018-02-05 12:02:35 +00:00
parent cea52929d3
commit 2f79da8702
18 changed files with 281 additions and 279 deletions

View File

@@ -96,7 +96,7 @@ def register_blueprint(application):
from app.template_statistics.rest import template_statistics as template_statistics_blueprint
from app.events.rest import events as events_blueprint
from app.provider_details.rest import provider_details as provider_details_blueprint
from app.organisation.rest import organisation_blueprint
from app.email_branding.rest import email_branding_blueprint
from app.dvla_organisation.rest import dvla_organisation_blueprint
from app.delivery.rest import delivery_blueprint
from app.inbound_number.rest import inbound_number_blueprint
@@ -159,8 +159,10 @@ def register_blueprint(application):
provider_details_blueprint.before_request(requires_admin_auth)
application.register_blueprint(provider_details_blueprint, url_prefix='/provider-details')
organisation_blueprint.before_request(requires_admin_auth)
application.register_blueprint(organisation_blueprint, url_prefix='/organisation')
email_branding_blueprint.before_request(requires_admin_auth)
application.register_blueprint(email_branding_blueprint, url_prefix='/email-branding')
# TODO: remove this route after admin is updated to refer to email branding
application.register_blueprint(email_branding_blueprint, url_prefix='/organisation')
dvla_organisation_blueprint.before_request(requires_admin_auth)
application.register_blueprint(dvla_organisation_blueprint, url_prefix='/dvla_organisations')