server/client recom.. connection 👍
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
from flask import Flask, request, jsonify
|
||||
from flask_cors import CORS
|
||||
from example1 import get_recommendations
|
||||
import time
|
||||
|
||||
|
||||
app = Flask(__name__)
|
||||
CORS(app) # Enable CORS for all routes
|
||||
@@ -15,6 +18,9 @@ def handle_session_data():
|
||||
if not user_id or not email or is_authenticated is None:
|
||||
return jsonify({'error': 'Invalid data'}), 400
|
||||
|
||||
print(get_recommendations(user_id))
|
||||
time.sleep(2)
|
||||
|
||||
print(f"Received session data: User ID: {user_id}, Email: {email}, Authenticated: {is_authenticated}")
|
||||
return jsonify({'message': 'Session data received successfully'})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user