incluido cors

This commit is contained in:
2020-11-20 07:44:19 -03:00
parent c5ad41a8ee
commit 3859087006
3 changed files with 7 additions and 1 deletions

View File

@@ -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():

View File

@@ -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}

4
requirements.txt Normal file
View File

@@ -0,0 +1,4 @@
flask
flask-cors
requests
gunicorn