diff --git a/home/entry.py b/home/entry.py index dccdd95..c901227 100644 --- a/home/entry.py +++ b/home/entry.py @@ -1,8 +1,10 @@ from flask import Flask, request +from flask_cors import CORS from . import services app = Flask(__name__) app.config.from_object('home.settings') +CORS(app) @app.route('/currency') def currency(): diff --git a/home/services/currency.py b/home/services/currency.py index 556330c..3c6d170 100644 --- a/home/services/currency.py +++ b/home/services/currency.py @@ -45,6 +45,6 @@ def rates(base, key): other_base= to_base(base, rates) symbols = query_symbols(key) - return {'rates' : other_base, 'symbols': symbols} + return {'base': base, 'rates' : other_base, 'symbols': symbols} diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..900d24a --- /dev/null +++ b/requirements.txt @@ -0,0 +1,4 @@ +flask +flask-cors +requests +gunicorn