newsletter-api-works

This commit is contained in:
tonyrewin 2023-01-31 21:07:39 +03:00
parent b70e80dacd
commit 97dd158358
4 changed files with 6 additions and 7 deletions

View File

@ -1,5 +1,5 @@
import MG from 'mailgun.js' const MG = require('mailgun.js')
import fd from 'form-data' const fd = require('form-data')
const mgOptions = { const mgOptions = {
key: process.env.MAILGUN_API_KEY, key: process.env.MAILGUN_API_KEY,

View File

@ -1,5 +1,5 @@
import MG from 'mailgun.js' const MG = require('mailgun.js')
import fd from 'form-data' const fd = require('form-data')
const mgOptions = { const mgOptions = {
key: process.env.MAILGUN_API_KEY, key: process.env.MAILGUN_API_KEY,

View File

@ -58,7 +58,6 @@ def upload_storj(filecontent, filename, bucket_name):
@app.route('/api/upload', methods=['post']) @app.route('/api/upload', methods=['post'])
def upload(): def upload():
print(request.files)
print(request.files.to_dict()) print(request.files.to_dict())
# check if the post request has the file part # check if the post request has the file part
if 'file' not in request.files: if 'file' not in request.files:

View File

@ -7,11 +7,11 @@
}, },
{ {
"src": "/api/newsletter", "src": "/api/newsletter",
"dest": "api/newsletter.ts" "dest": "api/newsletter.js"
}, },
{ {
"src": "/api/feedback", "src": "/api/feedback",
"dest": "api/feedback.ts" "dest": "api/feedback.js"
} }
] ]
} }