Add uploads blueprint, the endpoint returns a combination of uploaded letters and jobs. The endpoint returns data about the uploaded letter or job, including notification statistics for the upload. The data is ordered by scheduled for and created_at.

It is likely this endppoint will need additional data for the UI to display, for the first iteration this will enable the /uploads page to show both letters and jobs. Only letter uploaded by the UI are included in the resultset.

Add file name to resultset.
This commit is contained in:
David McDonald
2019-12-03 15:53:32 +00:00
committed by Rebecca Law
parent 570eb5e340
commit 203e19bef3
7 changed files with 501 additions and 0 deletions

View File

@@ -124,6 +124,7 @@ def register_blueprint(application):
from app.platform_stats.rest import platform_stats_blueprint
from app.template_folder.rest import template_folder_blueprint
from app.letter_branding.letter_branding_rest import letter_branding_blueprint
from app.upload.rest import upload_blueprint
service_blueprint.before_request(requires_admin_auth)
application.register_blueprint(service_blueprint, url_prefix='/service')
@@ -206,6 +207,9 @@ def register_blueprint(application):
letter_branding_blueprint.before_request(requires_admin_auth)
application.register_blueprint(letter_branding_blueprint)
upload_blueprint.before_request(requires_admin_auth)
application.register_blueprint(upload_blueprint)
def register_v2_blueprints(application):
from app.v2.inbound_sms.get_inbound_sms import v2_inbound_sms_blueprint as get_inbound_sms