remove flask-jsonify in favor of json.dumps

This commit is contained in:
gcarq 2018-06-25 00:07:53 +02:00
parent 127e50c932
commit d272e3b666
2 changed files with 9 additions and 6 deletions

View File

@ -4,7 +4,7 @@ import logging
# import json
from typing import Dict
from flask import Flask, request, jsonify
from flask import Flask, request
# from flask_restful import Resource, Api
from json import dumps
from freqtrade.rpc.rpc import RPC, RPCException
@ -91,10 +91,14 @@ class ApiServer(RPC):
"""
def page_not_found(self, error):
# Return "404 not found", 404.
return jsonify({'status': 'error',
"""
Return "404 not found", 404.
"""
return json.dumps({
'status': 'error',
'reason': '''There's no API call for %s''' % request.base_url,
'code': 404}), 404
'code': 404
}), 404
def hello(self):
"""

View File

@ -26,5 +26,4 @@ coinmarketcap==5.0.3
#Added for local rest client
Flask==1.0.2
flask-jsonpify==1.5.0
flask-restful==0.3.6