mirror of
https://github.com/kuhyx/WUT_Computer_Science.git
synced 2026-07-04 22:43:11 +02:00
Fixed analytics.py and added new test
This commit is contained in:
parent
2f117ea384
commit
e784c47f4c
@ -79,7 +79,7 @@ def get_movie_rating_avg(movie_id):
|
||||
def get_user_ratings(user_id):
|
||||
cursor = conn.cursor()
|
||||
cursor.execute("""
|
||||
SELECT *
|
||||
SELECT movie_ID, rating
|
||||
FROM ratings
|
||||
WHERE oauth_ID = %s;
|
||||
""", (user_id,))
|
||||
@ -111,6 +111,6 @@ if __name__ == "__main__":
|
||||
break
|
||||
|
||||
cache.init_app(app)
|
||||
app.run(host="0.0.0.0", port=8082, debug=True)
|
||||
app.run(host="localhost", port=8082, debug=True)
|
||||
|
||||
conn.close()
|
||||
|
||||
@ -28,3 +28,5 @@ GET http://localhost:8082/api/get_users_number
|
||||
###
|
||||
GET http://localhost:8082/api/get_movie_rating_avg/155
|
||||
###
|
||||
GET http://localhost:8082/api/get_user_ratings/1234
|
||||
###
|
||||
Loading…
Reference in New Issue
Block a user