diff --git a/api/feedback.js b/api/feedback.js index 5da6919f..ea40c6b2 100644 --- a/api/feedback.js +++ b/api/feedback.js @@ -1,5 +1,5 @@ -import MG from 'mailgun.js' -import fd from 'form-data' +const MG = require('mailgun.js') +const fd = require('form-data') const mgOptions = { key: process.env.MAILGUN_API_KEY, diff --git a/api/newsletter.ts b/api/newsletter.js similarity index 91% rename from api/newsletter.ts rename to api/newsletter.js index 9ad0ae07..d9724e03 100644 --- a/api/newsletter.ts +++ b/api/newsletter.js @@ -1,5 +1,5 @@ -import MG from 'mailgun.js' -import fd from 'form-data' +const MG = require('mailgun.js') +const fd = require('form-data') const mgOptions = { key: process.env.MAILGUN_API_KEY, diff --git a/api/upload.py b/api/upload.py index 17d63fa8..35fa88bf 100644 --- a/api/upload.py +++ b/api/upload.py @@ -58,7 +58,6 @@ def upload_storj(filecontent, filename, bucket_name): @app.route('/api/upload', methods=['post']) def upload(): - print(request.files) print(request.files.to_dict()) # check if the post request has the file part if 'file' not in request.files: diff --git a/vercel.json b/vercel.json index 6467869a..b5ab0ed9 100644 --- a/vercel.json +++ b/vercel.json @@ -7,11 +7,11 @@ }, { "src": "/api/newsletter", - "dest": "api/newsletter.ts" + "dest": "api/newsletter.js" }, { "src": "/api/feedback", - "dest": "api/feedback.ts" + "dest": "api/feedback.js" } ] }