mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-05-05 16:38:59 -04:00
Remove letter sending route without file_id
All instances of the app will be posting to the URL with the `file_id` parameter now, so we can remove the old route without the ID now.
This commit is contained in:
@@ -338,15 +338,13 @@ def view_letter_upload_as_preview(service_id, file_id):
|
||||
return TemplatePreview.from_valid_pdf_file(pdf_file, page)
|
||||
|
||||
|
||||
@main.route("/services/<uuid:service_id>/upload-letter/send", methods=['POST'])
|
||||
@main.route("/services/<uuid:service_id>/upload-letter/send/<uuid:file_id>", methods=['POST'])
|
||||
@user_has_permissions('send_messages', restrict_admin_usage=True)
|
||||
def send_uploaded_letter(service_id, file_id=None):
|
||||
if not (current_service.has_permission('letter') and current_service.has_permission('upload_letters')):
|
||||
abort(403)
|
||||
|
||||
form = LetterUploadPostageForm(file_id=file_id)
|
||||
file_id = file_id or form.file_id.data
|
||||
form = LetterUploadPostageForm()
|
||||
|
||||
if not form.validate_on_submit():
|
||||
return uploaded_letter_preview(service_id, file_id)
|
||||
|
||||
Reference in New Issue
Block a user