mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-01 23:55:58 -05:00
Update send letter jobs to return json
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import json
|
||||
|
||||
from flask import Blueprint, jsonify
|
||||
from flask import request
|
||||
|
||||
@@ -14,10 +16,12 @@ register_errors(letter_job)
|
||||
|
||||
@letter_job.route('/send-letter-jobs', methods=['POST'])
|
||||
def send_letter_jobs():
|
||||
job_ids = validate(request.get_json(), letter_job_ids)
|
||||
req_json = request.get_json()
|
||||
job_ids = validate(req_json, letter_job_ids)
|
||||
|
||||
notify_celery.send_task(name="send-files-to-dvla", args=(job_ids['job_ids'],), queue="process-ftp")
|
||||
|
||||
return "Task created to send files to DVLA"
|
||||
return jsonify(data={"response": "Task created to send files to DVLA"}), 200
|
||||
|
||||
|
||||
@letter_job.route('/letter-jobs', methods=['GET'])
|
||||
|
||||
Reference in New Issue
Block a user