diff --git a/ai_front_connector/frontend_AI_connector.py b/ai_front_connector/frontend_AI_connector.py index ad81eb5b..bcfd9c1c 100644 --- a/ai_front_connector/frontend_AI_connector.py +++ b/ai_front_connector/frontend_AI_connector.py @@ -12,11 +12,13 @@ db_connector = None def hello(): return jsonify({"response": "Hello there"}), 200 -@app.route("/api/v3/get//", methods=["POST"]) -def access_user(oauth_ID, username): - print(oauth_ID, username) - return jsonify({"status": "success"}), 200 +#endpoint do wyciągania danych o userze +@app.route("/api/v3/get/", methods=["GET"]) +def access_user(username): + return jsonify({"us": "er"}), 200 +#endpoint służący do zapisu danych nowostworzonego użytkownika, podajemy mu +#id z oautha oraz login @app.route("/api/v3/add//", methods=["POST"]) def add_user(oauth_ID, username): res = db_connector.search(tinydb.where('username') == username) @@ -28,7 +30,7 @@ def add_user(oauth_ID, username): return jsonify({"status": "success"}), 200 -#idk, czy zrobimy to w ten sposób, ale na wszelki w, route może pozostać, IG +#roboczy endpoint służący do wyciąganiu rekomendacji @app.route("/api/v3/ai/", methods=["GET"]) def get_recommendations(oauth_ID): #request od frontu na rekomendacje diff --git a/ai_front_connector/requirements.txt b/ai_front_connector/requirements.txt index 253b96c5..db43d5b1 100644 --- a/ai_front_connector/requirements.txt +++ b/ai_front_connector/requirements.txt @@ -1,2 +1,3 @@ tinydb==4.8.0 -flask==3.0.3 \ No newline at end of file +flask==3.0.3 +psycopg2==2.9.9 \ No newline at end of file