Spaces:
Runtime error
Runtime error
try no route name
Browse files- app.py +2 -2
- templates/index.html +1 -1
app.py
CHANGED
@@ -17,7 +17,7 @@ def home():
|
|
17 |
return render_template('index.html')
|
18 |
|
19 |
|
20 |
-
@app.route('
|
21 |
@cross_origin()
|
22 |
def recommend():
|
23 |
if request.method == "POST":
|
@@ -42,7 +42,7 @@ def recommend():
|
|
42 |
pass
|
43 |
|
44 |
|
45 |
-
@app.route('
|
46 |
def preflight():
|
47 |
resp = make_response("OK")
|
48 |
resp.status_code = 201
|
|
|
17 |
return render_template('index.html')
|
18 |
|
19 |
|
20 |
+
@app.route('/', methods=['POST'])
|
21 |
@cross_origin()
|
22 |
def recommend():
|
23 |
if request.method == "POST":
|
|
|
42 |
pass
|
43 |
|
44 |
|
45 |
+
@app.route('/', methods=['OPTIONS'])
|
46 |
def preflight():
|
47 |
resp = make_response("OK")
|
48 |
resp.status_code = 201
|
templates/index.html
CHANGED
@@ -192,7 +192,7 @@
|
|
192 |
e.preventDefault();
|
193 |
$.ajax({
|
194 |
type: 'POST',
|
195 |
-
url: '/
|
196 |
data: JSON.stringify(data),
|
197 |
headers: {'Access-Control-Allow-Origin': '*'},
|
198 |
contentType: "application/json",
|
|
|
192 |
e.preventDefault();
|
193 |
$.ajax({
|
194 |
type: 'POST',
|
195 |
+
url: '/',
|
196 |
data: JSON.stringify(data),
|
197 |
headers: {'Access-Control-Allow-Origin': '*'},
|
198 |
contentType: "application/json",
|