incluido cors
This commit is contained in:
@@ -1,8 +1,10 @@
|
|||||||
from flask import Flask, request
|
from flask import Flask, request
|
||||||
|
from flask_cors import CORS
|
||||||
from . import services
|
from . import services
|
||||||
|
|
||||||
app = Flask(__name__)
|
app = Flask(__name__)
|
||||||
app.config.from_object('home.settings')
|
app.config.from_object('home.settings')
|
||||||
|
CORS(app)
|
||||||
|
|
||||||
@app.route('/currency')
|
@app.route('/currency')
|
||||||
def currency():
|
def currency():
|
||||||
|
|||||||
@@ -45,6 +45,6 @@ def rates(base, key):
|
|||||||
other_base= to_base(base, rates)
|
other_base= to_base(base, rates)
|
||||||
symbols = query_symbols(key)
|
symbols = query_symbols(key)
|
||||||
|
|
||||||
return {'rates' : other_base, 'symbols': symbols}
|
return {'base': base, 'rates' : other_base, 'symbols': symbols}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
4
requirements.txt
Normal file
4
requirements.txt
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
flask
|
||||||
|
flask-cors
|
||||||
|
requests
|
||||||
|
gunicorn
|
||||||
Reference in New Issue
Block a user