Commit d7ca7c3b authored by Willard's avatar Willard

Fix wrong way of sendindg JSON

parent c7200b07
...@@ -43,7 +43,7 @@ def search(): ...@@ -43,7 +43,7 @@ def search():
@app.route('/api/users/new', methods=['POST']) @app.route('/api/users/new', methods=['POST'])
def new_user(): def new_user():
result = {success: True, message: ''} result = {'success': True, 'field': ''}
username = request.form['username'] username = request.form['username']
email = request.form['email'] email = request.form['email']
...@@ -62,7 +62,7 @@ def new_user(): ...@@ -62,7 +62,7 @@ def new_user():
db.session.add(user) db.session.add(user)
db.session.commit() db.session.commit()
return result return jsonify(result)
@auth.verify_password @auth.verify_password
def verify_password(username, password): def verify_password(username, password):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment