Skip to content
Snippets Groups Projects
Commit c5e8d9a8 authored by Chris Hines's avatar Chris Hines
Browse files

fix the contactus api endpoint

parent 47856ca1
3 merge requests!77Revert "disable agressive kill and restart",!35Dev,!18Dev
Pipeline #9254 passed
...@@ -178,9 +178,10 @@ class TunnelstatEP(Resource): ...@@ -178,9 +178,10 @@ class TunnelstatEP(Resource):
class ContactUs(Resource): class ContactUs(Resource):
def post(self): def post(self):
import tempfile import tempfile
data = json.loads(request.args.get('data')) print(request.get_json())
data = request.get_json()
f = tempfile.NamedTemporaryFile(mode='w+b',dir=app.config['MESSAGES'],delete=False) f = tempfile.NamedTemporaryFile(mode='w+b',dir=app.config['MESSAGES'],delete=False)
f.write(data) f.write(json.dumps(data).encode())
f.close() f.close()
return return
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment